public void ensureSetInputValueFailsIfMinimumPercentageGreaterThanMaximumPercentage()
        {
            WidthPercentageAlgorithm algorithm = new WidthPercentageAlgorithm();

            algorithm.setInputValue(Input.valueOf("Maximum Percentage", "range"), "0.9");
            Action action = () => algorithm.setInputValue(Input.valueOf("Minimum Percentage", "range"), "1");

            Assert.Throws <ArgumentException>(action);
        }
        public void ensureSetInputValueSucceeds()
        {
            WidthPercentageAlgorithm algorithm = new WidthPercentageAlgorithm();

            algorithm.setInputValue(Input.valueOf("Minimum Percentage", "range"), "0.9");
            Assert.Equal("0.9", algorithm.inputValues[0].value);
        }
        public void ensureSetInputValueFailsIfMinimumPercentageIsNotDouble()
        {
            WidthPercentageAlgorithm algorithm = new WidthPercentageAlgorithm();
            Action action = () => algorithm.setInputValue(Input.valueOf("Minimum Percentage", "range"), "If I deliver to you the impossible, then I might have earned your trust.");

            Assert.Throws <ArgumentException>(action);
        }
        public void ensureSetInputValueFailsIfInputDoesNotExist()
        {
            WidthPercentageAlgorithm algorithm = new WidthPercentageAlgorithm();
            Action action = () => algorithm.setInputValue(Input.valueOf("three", "range"), "val");

            Assert.Throws <ArgumentException>(action);
        }