public void GetTerminationTypeByName_InvalidName_Exception()
 {
     ExceptionAssert.IsThrowing(new ArgumentException("There is no ITermination implementation with name 'Test'.", "name"), () =>
     {
         TerminationService.GetTerminationTypeByName("Test");
     });
 }
 public void GetTerminationTypeByName_InvalidName_Exception()
 {
     Assert.Catch <ArgumentException>(() =>
     {
         TerminationService.GetTerminationTypeByName("Test");
     }, "There is no ITermination implementation with name 'Test'.");
 }
        public void GetTerminationTypeByName_ValidName_CrossoverTpe()
        {
            var actual = TerminationService.GetTerminationTypeByName("Generation Number");

            Assert.AreEqual(typeof(GenerationNumberTermination), actual);

            actual = TerminationService.GetTerminationTypeByName("Time Evolving");
            Assert.AreEqual(typeof(TimeEvolvingTermination), actual);

            actual = TerminationService.GetTerminationTypeByName("Fitness Threshold");
            Assert.AreEqual(typeof(FitnessThresholdTermination), actual);

            actual = TerminationService.GetTerminationTypeByName("Fitness Stagnation");
            Assert.AreEqual(typeof(FitnessStagnationTermination), actual);
        }