var sut = new CharacterClassLiteralCharacters(value, true); Assert.That(sut.Value, Is.EqualTo(value)); Assert.That(sut.Matches(']'), Is.True); Assert.That(sut.Matches('^'), Is.True); Assert.That(sut.Matches('-'), Is.True); Assert.That(sut.Matches('\\'), Is.True); Assert.That(sut.Matches('e'), Is.False); Assert.That(sut.Matches('$'), Is.False); } } }
var sut = new CharacterClassLiteralCharacters(value, false); Assert.That(sut.Value, Is.EqualTo(value)); Assert.That(sut.Matches(']'), Is.True); Assert.That(sut.Matches('^'), Is.True); Assert.That(sut.Matches('-'), Is.True); Assert.That(sut.Matches('\\'), Is.True); Assert.That(sut.Matches('e'), Is.False); Assert.That(sut.Matches('$'), Is.False); } [Test] public void CaseInsensitiveCharacterClassLiteralCharactersFromEscapedCharactersMatchesItsValue()