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.
GeneticSharp.Domain.Chromosomes.Gene
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()
There was an error while loading. Please reload this page.