public void ensureWidthPercentageAlgorithmIsCreated() { Console.WriteLine("ensureWidthPercentageAlgorithmIsCreated"); AlgorithmFactory factory = new AlgorithmFactory(); Algorithm algorithm = factory.createAlgorithm(RestrictionAlgorithm.WIDTH_PERCENTAGE_ALGORITHM); Assert.True(algorithm.GetType().ToString() == "core.domain.WidthPercentageAlgorithm"); }
public void ensureCreateAlgorithmFailsIfAlgorithmDoesNotExistd() { Console.WriteLine("ensureCreateAlgorithmFailsIfAlgorithmDoesNotExistd"); AlgorithmFactory factory = new AlgorithmFactory(); Action create = () => factory.createAlgorithm(0); Assert.Throws <ArgumentOutOfRangeException>(create); }