Example #1
0
        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");
        }
Example #2
0
        public void ensureCreateAlgorithmFailsIfAlgorithmDoesNotExistd()
        {
            Console.WriteLine("ensureCreateAlgorithmFailsIfAlgorithmDoesNotExistd");
            AlgorithmFactory factory = new AlgorithmFactory();
            Action           create  = () => factory.createAlgorithm(0);

            Assert.Throws <ArgumentOutOfRangeException>(create);
        }