-
-
Notifications
You must be signed in to change notification settings - Fork 344
unit tests
Diego Giacomelli edited this page Nov 3, 2018
·
3 revisions
For GeneticSharp we expected 100% of code coverage.
You can see the current code quality status of the project on our Sonar Dashboard.
Each class should have a corresponding unit test class, for example:
GeneticSharp.Domain.Chromosomes.Gene class will have a unit test class called GeneticSharp.Domain.UnitTests.Chromosomes.GeneTest.
We use Roy Osherove's naming strategy, it's the following:
UnitOfWork_StateUnderTest_ExpectedBehavior
Bellow some real samples from GeneticSharp's unit tests:
[Test]
public void Constructor_NullSelection_Exception()[Test]
public void Start_ParallelManyGenerations_Optimization()[Test]
public void Start_ParallelManySlowFitness_Timeout()[Test]
public void ReplaceGene_ValidIndex_Replaced()