public void GetSelectionTypeByName_InvalidName_Exception()
 {
     Assert.Catch <ArgumentException>(() =>
     {
         SelectionService.GetSelectionTypeByName("Test");
     }, "There is no ISelection implementation with name 'Test'.");
 }
 public void GetSelectionTypeByName_InvalidName_Exception()
 {
     ExceptionAssert.IsThrowing(new ArgumentException("There is no ISelection implementation with name 'Test'.", "name"), () =>
     {
         SelectionService.GetSelectionTypeByName("Test");
     });
 }
        public void GetSelectionTypeByName_ValidName_SelectionTpe()
        {
            var actual = SelectionService.GetSelectionTypeByName("Elite");

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

            actual = SelectionService.GetSelectionTypeByName("Roulette Wheel");
            Assert.AreEqual(typeof(RouletteWheelSelection), actual);

            actual = SelectionService.GetSelectionTypeByName("Tournament");
            Assert.AreEqual(typeof(TournamentSelection), actual);

            actual = SelectionService.GetSelectionTypeByName("Stochastic Universal Sampling");
            Assert.AreEqual(typeof(StochasticUniversalSamplingSelection), actual);
        }