public void WhenPartMatchesReturnsTrueNegatedCharacterClassMatchesReturnsFalse()
        {
            var mockCharacterClassPart = new Mock<ICharacterClassPart>();
            mockCharacterClassPart.Setup(m => m.Matches(It.IsAny<char>())).Returns(true);

            var sut = new CharacterClass(new[] { mockCharacterClassPart.Object }, true, false, 0, "[^a]");

            Assert.That(sut.Matches('a'), Is.False);
        }
 private static IList<ICharacterClassPart> AssertPartsCount(CharacterClass characterClass, int expectedCount)
 {
     Assert.That(characterClass.Parts.Count, Is.EqualTo(expectedCount));
     return characterClass.Parts;
 }