예제 #1
0
 public void HasMatch()
 {
     Assert.True(BracketMatcher.HasMatches("{}"));
 }
예제 #2
0
 public void IgnoresOtherCharacters()
 {
     Assert.True(BracketMatcher.HasMatches("{dkflksdfkjdf} kjdkjfksdf {lkjslkjsdf}"));
 }
예제 #3
0
 public void NullIsInvalid()
 {
     Assert.Throws <ArgumentNullException>(() => BracketMatcher.HasMatches(null));
 }
예제 #4
0
 public void LotsOfMatches()
 {
     Assert.True(BracketMatcher.HasMatches("{{}{}{}{}{}{}{}{}{{}{}{}{}{{}{}{}{}{}}}}"));
 }
예제 #5
0
 public void NoClosing()
 {
     Assert.False(BracketMatcher.HasMatches("{{{{{{{{{{{{"));
 }
예제 #6
0
 public void EmptyIsValid()
 {
     Assert.True(BracketMatcher.HasMatches(""));
 }
예제 #7
0
 public void MissingClosing()
 {
     Assert.False(BracketMatcher.HasMatches("{{}"));
 }
예제 #8
0
 public void OutOfOrder()
 {
     Assert.False(BracketMatcher.HasMatches("}{"));
 }