public void IsValidAnagramTestWithEmptyInput() { IsAnagram IA = new IsAnagram(); Action action = () => IA.IsValidAnagram(string.Empty, string.Empty); action.ShouldThrow <ArgumentException>(); }
public void IsAnagram() { IsAnagram angrm = new IsAnagram(); Assert.True(angrm.Check("geeksforgeeks", "forgeeksgeeks")); Assert.False(angrm.Check("allergy", "allergic")); }
public void IsValidAnagramTestWithNullInput() { IsAnagram IA = new IsAnagram(); Action action = () => IA.IsValidAnagram("rat", null); action.ShouldThrow <ArgumentException>(); }
public void GetResult_ShouldReturnCorrectResult(string s1, string s2, bool expectedResult) { // Arrange var sut = new IsAnagram(); // Act var result = sut.GetResult(s1, s2); // Assert Assert.AreEqual(expectedResult, result, "Result is incorrect"); }
public void IsValidAnagramTestWithequalStrings() { IsAnagram IA = new IsAnagram(); IA.IsValidAnagram("rat", "rat").Should().Be(true); }
public void IsValidAnagramTestWithStringsOfDifferentLength() { IsAnagram IA = new IsAnagram(); IA.IsValidAnagram("rat", "cats").Should().Be(false); }
public void IsValidAnagramNegativeTest() { IsAnagram IA = new IsAnagram(); IA.IsValidAnagram("rat", "cat").Should().Be(false); }
public void IsValidAnagramTest() { IsAnagram IA = new IsAnagram(); IA.IsValidAnagram("anagram", "nagaram").Should().Be(true); }
public void IsItAnagram_AnagramsPassed_ReturnsTrue() { Assert.IsTrue(IsAnagram.IsItAnagram("listen", "silent")); }
public void IsItAnagram_NonAnagramsPassed_ReturnsFalse() { Assert.IsFalse(IsAnagram.IsItAnagram("bob", "joe")); }
public void IsItAnagram_AnagramsPassed1_ReturnsTrue() { Assert.IsTrue(IsAnagram.IsItAnagram("abc", "cba")); }
public HomeController(IsAnagram anagramChecker) { AnagramChecker = anagramChecker; }