2. Objective
Automated test
Test for core methods only
Integrated with Jenkins
Build success only if all test success
Total 496 test cases for 6 core methods
3. Testing Framework – NUnit
Version 2.6
Written entirely in C#
Many advantages of .NET.
E.g. custom attributes and reflection.
Jenkins NUnit Plugin for build automation
NUnit = xUnit of .NET languages
Free
5. Naming
Roy osherov
Author of “Art of unit testing”
blog “Naming standards for unit tests”
[UnitOfWork_StateUnderTest_ExpectedBehavior]
GetProducts_Availability_NotNullExpected
GetProducts_CheckPriceLessThanOrEqualZero_CountZeroExp
ected
GetStreet_CheckDuplicateId_InputPostCode1113_CountZeroEx
pected
6. A A A
Arrange: setup everything needed.
Act: Invoke the code under test.
Assert: Specify the pass criteria for the
test, which fails it if not met.
In 2003 William C. Wake blogged about
using Arrange Act Assert pattern in unit
tests.