コード例 #1
0
            public void range_allows_only_specified_characters(char[] range, char givenLetter, bool expected)
            {
                var condition = CharacterCondition.Create(range, false);

                var actual = condition.IsMatch(givenLetter);

                actual.Should().Be(expected);
            }
コード例 #2
0
            public void range_resricts_specified_characters(char[] range, char givenLetter, bool expected)
            {
                var condition = CharacterCondition.Create(range, true);

                var actual = condition.IsMatch(givenLetter);

                actual.Should().Be(expected);
            }
コード例 #3
0
            public void single_character_allows_exactly_that_character(char allowedLetter, char givenLetter, bool expected)
            {
                var condition = CharacterCondition.Create(allowedLetter, false);

                var actual = condition.IsMatch(givenLetter);

                actual.Should().Be(expected);
            }