public void GetMutationTypeByName_InvalidName_Exception()
 {
     Assert.Catch <ArgumentException>(() =>
     {
         MutationService.GetMutationTypeByName("Test");
     }, "There is no IMutation implementation with name 'Test'.");
 }
Exemple #2
0
 public void GetMutationTypeByName_InvalidName_Exception()
 {
     ExceptionAssert.IsThrowing(new ArgumentException("There is no IMutation implementation with name 'Test'.", "name"), () =>
     {
         MutationService.GetMutationTypeByName("Test");
     });
 }
        public void GetMutationTypeByName_ValidName_CrossoverTpe()
        {
            var actual = MutationService.GetMutationTypeByName("Reverse Sequence (RSM)");

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

            actual = MutationService.GetMutationTypeByName("Twors");
            Assert.AreEqual(typeof(TworsMutation), actual);

            actual = MutationService.GetMutationTypeByName("Uniform");
            Assert.AreEqual(typeof(UniformMutation), actual);
        }