Your SlideShare is downloading. ×
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Test driving an MVVM App
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Test driving an MVVM App

3,889

Published on

A brief introduction on how to write a WPF/MVM application in Test Driven Development

A brief introduction on how to write a WPF/MVM application in Test Driven Development

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,889
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Test Driving a MVVM app
    Emanuele DelBono
    emanuele@codiceplastico.com
    http://blog.codiceplastico.com/ema
    Twitter @emadb
  • 2. Who I am
    Dev in CodicePlastico
    C#WPF/ASP.NET MVC
    Ruby/Ruby on Rails
    TDD passionate
    UgiALT.NET founder
    Speaker/blogger
  • 3. Agenda
    Very short intro to TDD
    2 pomodori of live coding
    Q&A&Discussion
  • 4. Prerequisites
    MVVM pattern
    Testing framework
    Test doubles (Mock/Stub)
  • 5. Doubts?
  • 6. MVVM in one slide
    View
    textbox
    button
    Properties
    listbox
    Commands
    ViewModel
    Model
  • 7. Testing Frameworks
    An xUnit tool to
    Minimize effort in writing tests
    Simplify the running phase
    Usually is an assembly to reference in your test projects, with:
    A bunch of attributes to mark the test methods
    A bunch of asserts to verify your expectations
  • 8. Test doubles
    To keep the focus on the tested object we need to remove all the dependencies
    Test doubles act as “fake” dependencies that replace the real ones
    Frameworks like Moq, RhinoMock, etc…came to help
  • 9. TDD
    Test Driven Development / Test Driven Design
    A design practice
    3 simple rules
    Write no production code without failing tests
    Write only enough test code so that it fails
    Write only enough production code to get your tests to pass
    Robert (uncle bob) Martin
  • 10. Sample App
    A simple Todo list manager
    When the app starts I want see the to do list
    I want to be able to add a new Item specifing a description and a due date
    I want to be able to delete an item
    I want to be able to mark an item as complete
  • 11. Tools
    Visual Studio 2010 / Expression Blend
    Resharper
    xUnit + xUnitContrib
    Moq
    Pomodoro
  • 12. First step
  • 13. Let’s Code
  • 14. Thanks
    References:
    Growing object oriented software – Freeman, Pryce – Addison Wesley
    The art of Unit Testing – RoyOsherove - Manning
    http://xunitpatterns.com/
    http://www.mockobjects.com/
    Code
    http://wpftodolist.googlecode.com
  • 15. …un ultimacosa…
    12 e 13 Giugno
    …ricordatevidei referendum 

×