Exemple #1
0
        public void ReturnsZero_If_InputIsEmpty()
        {
            var inverter = new CaptchaInverter(string.Empty);

            var sum = inverter.GetSum();

            sum.Should().Be(0);
        }
Exemple #2
0
        public void Returns_Expected(string input, int expected)
        {
            var inverter = new CaptchaInverter(input);

            var sum = inverter.GetSum();

            sum.Should().Be(expected);
        }
Exemple #3
0
        public void ReturnsDigit_If_InputContainsSameTwoDigits()
        {
            var inverter = new CaptchaInverter("11");

            var sum = inverter.GetSum();

            sum.Should().Be(2);
        }
Exemple #4
0
        public void ReturnsDigit_If_InputContainsDifferentTwoDigits()
        {
            var inverter = new CaptchaInverter("12");

            var sum = inverter.GetSum();

            sum.Should().Be(0);
        }
Exemple #5
0
        public void ReturnsDigit_If_InputContainsExactlyOneDigit()
        {
            var inverter = new CaptchaInverter("9");

            var sum = inverter.GetSum();

            sum.Should().Be(9);
        }