Added Calculators.Tests project with empty FibonacciTests Test fixture
Added Nunit package via Nuget
Added First test: CanCalculateFibonaciValueForZero
Build broken because FibonacciCalculator is not implemented
Add Calculators Library project
Added enough code for a completed build, but existing test fails.
Test Project contains the reference to the production library
Added enough implementation to Calculate method for existing test to pass.
Added test for the n=1 case.
Corrected the test name (missing c in Fibonacci)
Added note that we may want to refactor the tests to avoid duplication
Added logic to Calculate() for n=1
Tests pass
Refactored first test - using TestCase method attribute.
Onlye the first test's attribute was changed, to show that we should change and confirm step by step
Tests still passing!
Added testCase for n=1, but have not yet removed redundant test
Removed redundant test
Added Test Cases for n=2 and n=7; Tests fail for these but remain passing for others
implemented missing logic.
Also noted that we need to make a decision on how to treat negative n's.
We have decided that negative n's in this calculator should throw an exception, so:
Added edge case test: ShouldThrowExceptionForNLessThanZero
Build pass, test fails due to stack overflow (never ending recursive calls)
"The active Test Run was aborted because the execution process exited unexpectedly"
Added guard clause in Calculate. Tests pass
Refactor cycle:
extracted the error message string to a public constant field in FibonacciCalculator. Can be further extracted to a resource file or other mechanism for translation;
Added an exception message test to the exception unit test, as suggested in Stephan Vance's "Quality Code" (p.132 - Verify the Exception Message)