public void ThrowsForInvalidInputs(string inputLine) { Action action = () => PasswordLine.Parse(inputLine); // ACT & ASSERT action.Should().Throw <InvalidOperationException>() .WithMessage("Invalid password line: " + inputLine); }
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)); }