This project is read-only.

Unit Test Best Practices

Guidelines for the SLHVP Project
Last Update: Jan 21

What to test

  • For now, we're only asking for unit tests on business objects and other code that is not dependent on UI objects

Useful Conventions

From The Art Of Unit Testing
Here are the three parts of the test method name:
❂ MethodName—The name of the method you’re testing
❂ StateUnderTest—The conditions used to produce the expected behavior
❂ ExpectedBehavior—What you expect the tested method to do under the specified conditions

Thus if you are testing a method GetConfigFile and you want to test whether sending a valid config file name returns a valid file your test name would be GetConfigSentValidFileNameReturnsTrue

Last edited Jan 21, 2010 at 1:14 AM by jliberty, version 1


No comments yet.