public void SwizzleArgument_ShouldNotRead_SpaceCharacter() { // Arrange HashSet <char> characters = new HashSet <char>() { 'a', 'b', 'c' }; SwizzleArgument argument = new SwizzleArgument(characters); IStringReader reader = new StringReader("ab c"); // Act argument.Parse(reader, out _); // Assert Assert.IsTrue(reader.CanRead(2)); }
public void SwizzleArgument_ParseShouldFail_BecauseInvalidCharacter() { // Arrange HashSet <char> characters = new HashSet <char>() { 'a', 'b', 'c' }; SwizzleArgument argument = new SwizzleArgument(characters); IStringReader reader = new StringReader("abcd"); // Act ReadResults readResults = argument.Parse(reader, out _); // Assert Assert.IsFalse(readResults.Successful); }