Exemplo n.º 1
0
            public void ThrowsForInvalidInputs(string inputLine)
            {
                Action action = () => PasswordLine.Parse(inputLine);

                // ACT & ASSERT
                action.Should().Throw <InvalidOperationException>()
                .WithMessage("Invalid password line: " + inputLine);
            }
Exemplo n.º 2
0
            public void ParsesValidInputs(
                string inputLine,
                int expectedLowerBound,
                int expectedUpperBound,
                char expectedRequiredChar,
                string expectedPassword)
            {
                // ACT
                var result = PasswordLine.Parse(inputLine);

                // ASSERT
                result.Should().BeEquivalentTo(
                    new PasswordLine(expectedLowerBound, expectedUpperBound, expectedRequiredChar, expectedPassword));
            }