Timmy Kokke Silverlight / ASP.Net Developer UNIT4 Internet Solutions Expression Blend MVP.

Slides:



Advertisements
Similar presentations
MVVM Overview Frank Shoemaker MindCrafted Systems
Advertisements

Svetlin Nakov Director Training and Consulting Activities National Academy for Software Development (NASD) ASP.NET 3.5 New Features.
Unit testing in.Net. Copyright 2007 Tikal Knowledge, Ltd. | 2 | Agenda Introduction Visual Studio built-in support Open source frameworks Working together.
Ronnie Saurenmann Job title: Cant live without Silverlight Microsoft Switzerland 4 Overview.
Change the Rules Silverlight 4 – Whats New? ( part 1 ) Mike Taulty, Microsoft UK
Unit Testing Australian Development Centre Brisbane, Australia.
Migration of a VFP application into a Silverswitch solution
.NET Framework Overview
Silverlight is dead! Long live MVVM!
Understanding the MVVM pattern
Slides adapted from Alex Mariakakis, with material from Krysta Yousoufian, Mike Ernst, and Kellen Donohue Section 4: Graphs and Testing.
Java Script Session1 INTRODUCTION.
An Introduction Timmy Kokke | UNIT4 Internet Solutions | Expression Blend MVP / Webguy.
Integrated Development Environments, Source Control Repositories, Automated Testing Tools, Bug Tracking, Code Analysis Tools, Build Tools, Project Hosting.
Some Testing Techniques (enhanced 6 + 4) Course Software Testing & Verification 2013/14 Wishnu Prasetya.
Patterns & practices Symposium 2013 Tips for building a Windows Store app using XAML and C#: The Kona project Francis Cheung
Silverlight Presenter: Kevin Grossnicklaus February 25 th, 2010.
What is Unit Testing? How TDD Works? Tsvyatko Konov Telerik Corporation
MVVM: Filling the Pattern Gap in Silverlight Application Development Bart McDonough Principal Consultant Incline Technical Group.
USING THE MODEL-VIEW- VIEWMODEL PATTERN Laurent Bugnion Director, User Experience Integration IdentityMine
Lessons learned from developing a Windows 8 Metro application in C# Frode Nilsen Nilsen Labs Ticki.
Building Your First Great Silverlight 2 Application Guy Burstein Microsoft Israel
Testing by Duncan Butler Sara Stephens. Too much to cover.
T.N.C.Venkata Rangan CMD, Vishwak Solutions Pvt. Ltd. Microsoft (MSDN) Regional Director, Chennai Microsoft MVP – Windows Live Platform Living with Heterogeneity.
By, Ben Dewey Senior Software Developer Tallan, Inc.
By, Ben Dewey Senior Software Developer twentySix New York
24-Jun-15 JUnit. 2 Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (running whatever tests.
Laurent Bugnion Director, UX MVVM Powers Silverlight Development.
Building Silverlight Applications Using the MVVM pattern An Introduction by Peter Messenger Senior Developer – Qmastor
Joe xamlcoder.com/blog Silverlight / WPF Consultant.
Equivalence Partitioning Identify the inputs, behaviors, or other factors that you want to test based on the functionality and specifications Group these.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
Testing Especially Unit Testing. V-model Wikipedia:
Claudio Lassala Software Developer EPS Software / CODE Magazine Session Code: DEV 201.
Unit Testing Building Rock-Solid Software SoftUni Team Technical Trainers Software University
1 (Worker Queues) cs What is a Thread Pool? A collection of threads that are created once (e.g. when a server starts) That is, no need to create.
Windows Phone MVVM and Unit Testing Step by Step Andy Wigley Windows Phone Development MVP, Mobile Software Consultant APPA Mundi Ltd WPH208.
Introduction to Unit Testing. Unit testing – testing methods/classes of the program Test suite is composed of several tests Test suite should cover all.
Declarative Programming Layout and Controls Events and Commands Working with Data Styles.
Microsoft Silverlight Anny Liu, IMNA.  Introduction to RIA  Introduction to Silverlight  A Silverlight Application Outline.
Chapter 8 Testing the Programs. Chapter 8 Learning Objectives Be able to …  Define different types of faults and how to classify them  Define the purpose.
Building State of the art presentation tiers Nauzad Kapadia
Nikhil Kothari Software Architect Microsoft Corporation Session Code: WUX312.
EUnit a powerful unit testing framework for Erlang Richard Carlsson Mickaël Rémond.
Unit Testing Building Rock-Solid Software Svetlin Nakov Technical Trainer Software University
Platform abstractionSeparate UI and logic.
Microsoft Confidential Host (.exe, IIS/WAS,.NET Services, …) WF Runtime Extensions Tracking Persistence … … Tooling VS Designer VS Debugger Rehosted.
Justin Bare and Deric Pang with material from Erin Peach, Nick Carney, Vinod Rathnam, Alex Mariakakis, Krysta Yousoufian, Mike Ernst, Kellen Donohue Section.
Message Framework Topic subscribe for javascript/flex client.
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
Windows 8 apps and the MVVM pattern SILVERLIGHTSHOW.NET WEBINARS SERIES GILL CLEEREN, October 16 th
The Visual LANSA Framework. Topics What is it ?  The Visual LANSA Framework is an application framework that helps you to:  Prototype  Design  Implement.
Ken Casada Developer Evangelist Microsoft Switzerland
Unit Testing Silverlight & Windows Phone Applications Jeff Wilcox Senior Software Development Engineer Silverlight
The cutting edge event for ITPros and Devs December 7-8, 2013 Athens, Greece Fix it once use it everywhere Elias Markelis MCT, Windows Phone Enthusiast.
CSE 143 Lecture 14: testing.
Fuzzing Machine By Nikolaj Tolkačiov.
Real world Windows Phone development
Building Rock-Solid Software
Thread Pools (Worker Queues) cs
Coding Defensively Coding Defensively
Unit Testing & Test-Driven Development for Mere Mortals
Unit Testing & Test-Driven Development for Mere Mortals
Component Testing (Unit Testing)
Integrating Security Roles into Microsoft Silverlight Applications
Unit Testing & Test-Driven Development for Mere Mortals
XAML Deep Dive for Windows & Windows Phone Apps Jump Start
Paul Stubbs MCSD, MCSE 4.0, MCP+I, MCT, MCAD .Net
An Introduction to the Model-View-ViewModel Pattern
Presentation transcript:

Timmy Kokke Silverlight / ASP.Net Developer UNIT4 Internet Solutions Expression Blend MVP

Basics of MVVM Unit Testing Silverlight Unit Testing framework StatLight

ModelModel ViewView ViewModelViewModel

ModelModel ViewView ViewModelViewModel

ModelModel ViewView ViewModelViewModel

ModelModel ViewView ViewModelViewModel

ModelModel ViewView ViewModelViewModel Databinding Commands Methods Events

Unit tests are consistent, isolated, fast and repeatable

Test only small units of work TestName = Requirement 1 Assert per test Self explanatory Readability over Maintainability

Silverlight Toolkit Runs in browser, no support for MsTest

[TestClass] public class ExampleTests{ [TestMethod] public class Adding_1_And_1_Should_Be_2(){ int result = 1 + 1; Assert.AreEqual(2, result); }

ServerServer Silverlight Client GamesViewModelGamesViewModel GamesViewGamesView GamesDataServiceGamesDataService WCF Ria Service DatabaseDatabase

Unit Test ServerServer Silverlight Client GamesViewModelGamesViewModel GamesViewGamesView GamesDataServiceGamesDataService WCF Ria Service DatabaseDatabase TestGamesDataServiceTestGamesDataService IGamesDataServiceIGamesDataService GamesViewModelTestsGamesViewModelTests

[TestMethod] [Tag("Rating")] public void Setting_Ratings_Should_Set_AverageRating() { Rating rating = new Rating(); rating.GameplayRating = 4; rating.GraphicsRating = 2; Assert.AreEqual(3, rating.AverageRating); }

[TestMethod] [Description("Testing implementation of IDataErrorInfo."+ "Empty String Name should return Error.")] public void Getting_ErrorInfo_For_Empty_Name_Should_Return_Error() { Rating errorInfo = new Rating {Name = string.Empty}; string result = errorInfo["Name"]; Assert.IsFalse(string.IsNullOrWhiteSpace(result)); }

[TestMethod] [Asynchronous] public void Executing_InitializeCommand_Should_Get_Publishers() { PublishersViewModel viewModel = new PublishersViewModel( new TestPublishersDataService()); viewModel.PropertyChanged += (s, a) => { Assert.IsTrue(viewModel.Publishers != null); EnqueueTestComplete(); }; viewModel.InitializeCommand.Execute(null); }

[TestMethod] [Bug("Submitting is not implemented at this moment.")] [WorkItem(1543)] [Asynchronous] public void Executing_SubmitCommand_Should_Navigate_To_GamesList() { DecoupledEventAggregator.GetInstance().GetEvent ().Subscribe((a) => { Assert.IsTrue(true); EnqueueTestComplete(); }); RatingViewModel viewModel = new RatingViewModel(new TestGamesDataService()); viewModel.SubmitCommand.Execute(null); }

[TestMethod] [Asynchronous] [Timeout(250)] public void Executing_GetMoreCommand_Should_Respond_In_250ms() { PublishersViewModel viewModel = new PublishersViewModel(new TestPublishersDataService()); viewModel.PropertyChanged += (s, a) => { Assert.IsTrue(true); EnqueueTestComplete(); }; viewModel.GetMoreCommand.Execute(null); }

[TestMethod] [ExpectedException(typeof(ArgumentNullException))] public void Executing_SubmitCommand_With_Null_Should_Throw_Exception() { RatingViewModel viewModel = new RatingViewModel(new TestGamesDataService()); viewModel.SubmitCommand.Execute(null); }

Command line tool Possible to integrate in TFS build Continuous mode

Timmy Kokke Silverlight and Expression Usergroup 9 November next meeting !