public void CharAtTest() { const string text = "one"; var alphabet = new Alphabet(text); for (int i = 0; i < text.Length; i++) { Assert.AreEqual(text[i], alphabet.CharAt(i)); } }
public void AbsobtionTest() { const string text = "one"; var alphabet = new Alphabet(text); for (int i = 0; i < text.Length; i++) { Assert.AreEqual(i, alphabet.IndexOf(alphabet[i])); Assert.AreEqual(text[i], alphabet.CharAt( alphabet.IndexOf(text[i]))); } }
public void DistinctTest() { const string text = "test"; var alphabet = new Alphabet(text); var distinctText = text.Distinct().ToList(); for (int i = 0; i < distinctText.Count; i++) { Assert.AreEqual(distinctText[i], alphabet.CharAt(i)); } }