Exemplo n.º 1
0
        public void InputNegativeNumbersAsStringReturnsException()
        {
            var runner = new AppRunner();

            var exception = Assert.Throws <ArgumentException>(() => runner.Add("-1,2,-3"));

            Assert.Equal("Negatives not allowed: -1, -3", exception.Message);
        }
Exemplo n.º 2
0
        public void InvalidDelimiterReturnsException()
        {
            var runner = new AppRunner();

            var exception = Assert.Throws <ArgumentException>(() => runner.Add("//[7&&][%]\n3&7&2%3"));

            Assert.Equal("Invalid delimiter passed.", exception.Message);
        }
Exemplo n.º 3
0
        public void InputReturnsSumOfIntegers_SatisfyingKataStepRules(string value, int expectedValue)
        {
            var runner = new AppRunner();

            var actual = runner.Add(value);

            Assert.Equal(expectedValue, actual);
        }