• Testing & ALM

    Windows 8 AppBars in WinJS

    Microsoft’s guidance for Windows 8 applications is based on content over chrome. Development styles for prior versions of Windows often included navigation controls, buttons, tabs, and other non-content related items intermixed with the data, often obscuring the information that the application was trying to convey. This isn’t to say that we were all doing it wrong all of these years, as there wasn’t a mechanism (or even guidance) in place to provide an alternative.
    January 17, 2013
  • .NET

    Asserting Behavior with JustMock

    JustMock is a great tool for abstracting dependencies in unit tests, and the new automocking feature makes it even faster to develop unit tests.  Another great feature in JustMock and JustMock Lite is the capability to assert the behavior of your system under test.  Traditional TDD (Test Driven Testing) unit testing typically tests for state.  Did the user get logged in? Did the user’s shopping cart get loaded?  Important tests, of course.  But that only tests the end result of the method.  If the user does NOT successfully login, and the cart is not reloaded, is that because the call to the repository was never called? Or because some error happened that didn’t reload the cart in this particular use case?  The state of the application is correct, but is that because it executed the expected behavior, or because we got lucky? 
    January 10, 2013
  • .NET

    Developer Resolutions for 2013

    My friend and coworker Chris Eargle wrote a great post on some resolutions for the New Year.  It made me think about how lucky we were to avoid this particular apocalypse (along with all of the others that I've lived through in my 45 years), so I’ve come up with a few developer centric resolutions of my own.
    January 07, 2013
  • .NET

    Mocking Property Getters and Setters

    In typical unit testing scenarios, mocking property getters and setters isn't high on the list of areas of concern. Where it usually comes into play is when an entity’s properties’ values (or the act of setting them) are part of the scaffolding, or behavior for the system under test.
    December 27, 2012
  • Testing & ALM

    MVVM in WinJS Part 2 – Observable Collections

    As I explained in my last post on MVVM in WinJS, the goal of the MVVM pattern (as well as the Presentation Model pattern) is to create a separation of concerns between the model and the view. This eliminates the need for the model to have knowledge of the view, and leverages data binding techniques to make sure the state of the model is always accurately represented by the view. The next step in implementing the MVVM pattern is Observable Collections. Just as important as having individual items being Observable by the View for changes are collections that will notify the View when items are added or deleted. Fortunately, Microsoft has made this extremely simple with the WinJS.Binding.List.
    December 20, 2012