public void CreateGenerationStrategyByName_ValidNameButInvalidConstructorArgs_Exception()
 {
     Assert.Catch <ArgumentException>(() =>
     {
         PopulationService.CreateGenerationStrategyByName("Tracking", 1);
     }, "A IGenerationStrategy's implementation with name 'Tracking' was found, but seems the constructor args were invalid.");
 }
예제 #2
0
 public void CreateGenerationStrategyByName_ValidNameButInvalidConstructorArgs_Exception()
 {
     ExceptionAssert.IsThrowing(new ArgumentException("A IGenerationStrategy's implementation with name 'Tracking' was found, but seems the constructor args were invalid.", "constructorArgs"), () =>
     {
         PopulationService.CreateGenerationStrategyByName("Tracking", 1);
     });
 }
 public void CreateGenerationStrategyByName_InvalidName_Exception()
 {
     Assert.Catch <ArgumentException>(() =>
     {
         PopulationService.CreateGenerationStrategyByName("Test");
     }, "There is no IGenerationStrategy implementation with name 'Test'.");
 }
예제 #4
0
 public void CreateGenerationStrategyByName_InvalidName_Exception()
 {
     ExceptionAssert.IsThrowing(new ArgumentException("There is no IGenerationStrategy implementation with name 'Test'.", "name"), () =>
     {
         PopulationService.CreateGenerationStrategyByName("Test");
     });
 }
예제 #5
0
        public void CreateGenerationStrategyByName_ValidName_GenerationStrategyCreated()
        {
            IGenerationStrategy actual = PopulationService.CreateGenerationStrategyByName("Performance", 1) as PerformanceGenerationStrategy;

            Assert.IsNotNull(actual);

            actual = PopulationService.CreateGenerationStrategyByName("Tracking") as TrackingGenerationStrategy;
            Assert.IsNotNull(actual);
        }