public void CreateTerminationByName_ValidNameButInvalidConstructorArgs_Exception()
 {
     ExceptionAssert.IsThrowing(new ArgumentException("A ITermination's implementation with name 'Generation Number' was found, but seems the constructor args were invalid.", "constructorArgs"), () =>
     {
         TerminationService.CreateTerminationByName("Generation Number", 1f);
     });
 }
 public void CreateTerminationByName_ValidNameButInvalidConstructorArgs_Exception()
 {
     Assert.Catch <ArgumentException>(() =>
     {
         TerminationService.CreateTerminationByName("Generation Number", 1f);
     }, "A ITermination's implementation with name 'Generation Number' was found, but seems the constructor args were invalid.");
 }
 public void CreateTerminationByName_InvalidName_Exception()
 {
     ExceptionAssert.IsThrowing(new ArgumentException("There is no ITermination implementation with name 'Test'.", "name"), () =>
     {
         TerminationService.CreateTerminationByName("Test");
     });
 }
 public void CreateTerminationByName_InvalidName_Exception()
 {
     Assert.Catch <ArgumentException>(() =>
     {
         TerminationService.CreateTerminationByName("Test");
     }, "There is no ITermination implementation with name 'Test'.");
 }
        public void CreateTerminationByName_ValidName_TerminationCreated()
        {
            ITermination actual = TerminationService.CreateTerminationByName("Fitness Stagnation") as FitnessStagnationTermination;

            Assert.IsNotNull(actual);

            actual = TerminationService.CreateTerminationByName("Fitness Threshold") as FitnessThresholdTermination;
            Assert.IsNotNull(actual);

            actual = TerminationService.CreateTerminationByName("Generation Number") as GenerationNumberTermination;
            Assert.IsNotNull(actual);

            actual = TerminationService.CreateTerminationByName("Time Evolving") as TimeEvolvingTermination;
            Assert.IsNotNull(actual);
        }