public void IsMutation_TwoWordsDifferInLength_ReturnsFalse() { MutationChecker checker = new MutationChecker(); bool result = checker.IsMutation("asdf", "jkl"); Assert.That(result, Is.False); }
public void IsMutation_MoreThanOneCharacterDiffers_ReturnsFalse() { MutationChecker checker = new MutationChecker(); bool result = checker.IsMutation("eins", "eimß"); Assert.That(result, Is.False); }
public void IsMutation_TwoEqualWords_ReturnsFalse() { MutationChecker checker = new MutationChecker(); bool result = checker.IsMutation("eins", "eins"); Assert.That(result, Is.False); }
public void IsMutation_IsValidMutation_ReturnsTrue() { MutationChecker checker = new MutationChecker(); bool result = checker.IsMutation("cog", "cot"); Assert.That(result, Is.True); }
public void GetAllMutations_ForDictionaryWithTenElementsAndThreeValidMutations_ReturnThreeElements() { var checker = new MutationChecker(); MutationFinder finder = new MutationFinder(checker); var sourceDict = new List<string> { "cot", "bat", "fat", "aaa", "bbb", "ccc", "ddd", "eee", "fff", "xxx" }; List<string> result = finder.GetAllMutations("cat", sourceDict); Assert.That(result.Count, Is.EqualTo(3)); }