예제 #1
0
 public void IsValidAnagramTestWithStringsOfDifferentLength()
 {
     IsAnagram IA = new IsAnagram();
     IA.IsValidAnagram("rat", "cats").Should().Be(false);
 }
예제 #2
0
 public void IsValidAnagramTestWithNullInput()
 {
     IsAnagram IA = new IsAnagram();
     Action action=()=>IA.IsValidAnagram("rat", null);
     action.ShouldThrow<ArgumentException>();
 }
예제 #3
0
 public void IsValidAnagramTestWithequalStrings()
 {
     IsAnagram IA = new IsAnagram();
     IA.IsValidAnagram("rat", "rat").Should().Be(true);
 }
예제 #4
0
 public void IsValidAnagramTestWithEmptyInput()
 {
     IsAnagram IA = new IsAnagram();
     Action action = () => IA.IsValidAnagram(string.Empty, string.Empty);
     action.ShouldThrow<ArgumentException>();
 }
예제 #5
0
 public void IsValidAnagramTest()
 {
     IsAnagram IA=new IsAnagram();
     IA.IsValidAnagram("anagram", "nagaram").Should().Be(true);
 }
예제 #6
0
 public void IsValidAnagramNegativeTest()
 {
     IsAnagram IA = new IsAnagram();
     IA.IsValidAnagram("rat", "cat").Should().Be(false);
 }