dbones notes
its a geek thing

The list of TDD anti patterns

December 4, 2009 17:32 by Dave
when writting unit tests you may wonder, what im i actually doing? I follow the AAA pattern, well try to ;).  anyway I found this link on StackOverflow, which has a list of anti patterns for TDD (Unit testing) http://blog.james-carr.org/2006/11/03/tdd-anti-patterns/ well worth... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Test
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Unit testing presentation

November 26, 2009 12:20 by Dave
Small presentation on Unit testing, so find strong coupling. [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: General | Test
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Rowtest with MbUnit

June 30, 2009 00:29 by Dave
I wrote a test which used the Row test attribute, which is a nice feature. This test looks at different states of a form and then tests if the correct email call is made. very similar to the previos post [code:c#] [Test] [Row(new object[] { "State Changed", "To: 2, from... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Test
Actions: E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed

Mocking a void function, and ensuring it was called

June 25, 2009 22:59 by Dave
One thing I wanted to do was to ensure my code was calling a function with the correct inputs. However the function did not return anything (void) and I did not want to write a mock object from scratch which had a verify method was called (that seemed like re-writing the wheel). So I looked a litt... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Test
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Getting MbUnit to work with Visual Studio Code Coverage

April 16, 2009 00:13 by Dave
Whilst working on open source project I am detracting away from MsTest in favour for MbUnit (plus this has awesome functionality). The thing was I still wanted to have code coverage within Visual Studio, Its a great way to see what code is being hit by the tests which have been written. Upon resea... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Test
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Struture of a Unit Test

April 14, 2009 22:43 by Dave
A Test fixture can be made of the following Fixture (the following are optional) FixtureSetUp - this is ran once before all the tests (set up the fixture) FixtureTearDown - run after all the tests have completed (this can be used to clean up after all the tests) ... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Test
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Using reflection to test for equality

February 9, 2008 00:33 by Dave
Lets say you want to do some TDD, as you may know that you have in some/most test an Expected answer and an Actual answer. In the case of the expected/actual being a value type or string its easy just to use: [code:c#] Assert.AreEqual<string> ("this is ex... [More]

Currently rated 3.0 by 1 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: dotNet | Test
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

A Text file test trace listener

February 4, 2008 22:29 by Dave
Testing your logging functionality, using the Enterprise library and a custom trace listener. As I was in need of a method to test some loggin functions, i googled away and found this exellent article <http://blogs.msdn.com/ploeh/archive/2006/04/06/ UnitTestYourEnterpriseLibraryLoggingLo... [More]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: dotNet | Test
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed