Tag Archive | "Unit testing"

Tags: , , , , , , , ,

Unit testing on compact framework applications

Posted on 16 October 2009 by Alexander Viken

Friday and time to do some browsing for interesting news.

I´ve been browsing for a long time now, looking for a mocking or isolation framework  to aid me with my unit tests. So far, i have not found anything.

Both NUnit and MSTest work with the compact framework. but none of the available mocking/isolation frameworks does so we are stuck with manually creating stubs and mocks. This is very time consuming and in a larger project you ´re going to have a hard time convincing anyone that there is time and money enough to replicate everything as mocks.

So, what to do? for the better part of a year i have from time to time been “nagging” Typemock about this, unfortunately with no luck yet. Today i posted a feature request to their forum with a poll and i would like everyone that are interested in compact framework development to keep hitting that yes button :)

The reason for targeting Typemock is that i totally likes their full framework version, it is _the_ best mock/isolation framework available. Continue Reading

Comments (0)

Tags: , , , , , , , , , , , , , , , , , , , ,

Setting up a maintainable windows phone development project in Visual Studio 2008

Posted on 14 October 2009 by Alexander Viken

In this post i share what is my experience, and what i have found to work for me as a best practice for setting up my projects and software structure when developing windows phone applications in Visual Studio 2008.

Basically I am  applying some Model-View-Presenter principles tweaked for simplicity and dividing the different parts into separate projects.

The Model-View-Presenter software design pattern is in my opinion the easiest pattern to use. It is also easy to get going with if you`re not familiar with the jungle of three or four letter acronym patterns and support frameworks available.

Patterns are important and you should use them! By applying, in this case a MVP pattern we can easily handle the rapid changes in new hardware, screen form factors, UX requirements and connectivity requirements to back-end systems. Continue Reading

Comments (2)

Tags: , , , , , , , , , , , , ,

NDC 2009 Day 2

Posted on 19 June 2009 by Alexander Viken

Morning glory

Day two of NDC begins as a rainy day, but i am looking forward to getting out to Telenor Arena, Today the topics starts with issues i really care about – Test Driven Development and Unit Testing of code.

It´s a proven, working concept that increases code quality and it saves you a whole lot of money. Something that should make the TDD argument extremely easy to sell to your manager. Added benefit here is that your customer will find less errors and bugs, this makes them happy and more prone to ask for more functionality and upgrades. 

Understanding Test Driven Development with Roy Osherove

RoyOsheroveThis was a level 100 session so it was a basic intro to unit testing and TDD. If you are new to unit testing and TDD principles you should have been there. Some advice on your way as a happier coder; You should learn unit testing first, and when you know how to write tests and use unit testing frameworks you start using Test Driven Development as a development method. This makes it a lot easier for you as a developer. Also, only write tests for public methods that contain logic. Code that has public accessors and contains if statements, switches and loops etc, there is no value in testing the rest in a unit test. Continue Reading

Comments (0)

About the author, Alexander Viken
Working as Chief Mobility Consultant at Creuna Norway. I received MSFT MVP for Device Application Development in June 2010 and are interested in mobility trends, the market, technology, software development for Windows Phone, iOS and Android mostly, but not exclusively. Scrum master that fights to keep it lean.
Advertise Here

Me on Twitter