public void Test_DecodeMessage(string encodedMessage, string decodedMessage) { AlphabetUtility sut = new AlphabetUtility(encodedMessage); var result = sut.DecodeMessage(); Assert.That(result, Is.EqualTo(decodedMessage)); }
public void Test_CycleLetters(string input, string expectedResult) { AlphabetUtility sut = new AlphabetUtility(input); var result = sut.CycleLetters(); Assert.That(result, Is.EqualTo(expectedResult)); }
public void Test_FindMostQuantityLetter() { string input = "The quick brown fox jumps over the lazy dog"; var result = AlphabetUtility.FindMostQuantityLetter(input); Assert.That(result, Is.EqualTo(4)); }
public void Test_CalculateBankThief(int timeNeededByPolice, int wordsPerMinute, int timeAfterSentence, int timeAfterAllSentences, string inputSentence, string expected) { var robberyData = new RobberyData(timeNeededByPolice, wordsPerMinute, timeAfterSentence, timeAfterAllSentences, inputSentence); var result = AlphabetUtility.CalculateBankThief(robberyData); Assert.That(result, Is.EqualTo(expected)); }
public void Test_GetIndexOfLetterInAlphabet() { string alphabet = "abcdefghijklmnopqrstuvwxyz"; string input = "DAbE"; var indexes = AlphabetUtility.GetIndexOfLettersInAlphabet(alphabet, input); CollectionAssert.Contains(indexes, 3); CollectionAssert.Contains(indexes, 0); CollectionAssert.Contains(indexes, 1); CollectionAssert.Contains(indexes, 4); Assert.That(indexes.Count, Is.EqualTo(4)); }
public void Test_DecodeMessageAlternatelyFromLeftRight(string input, string expected) { var result = AlphabetUtility.DecodeMessageAlternatelyFromLeftRight(input); Assert.That(result, Is.EqualTo(expected)); }
public void Test_EncodeMessage(string input, string expected) { var output = AlphabetUtility.EncodeMessage(input); Assert.That(output, Is.EqualTo(expected)); }
public void Test_CaesarBoxCipher(string input, string output) { AlphabetUtility sut = new AlphabetUtility(input); Assert.That(sut.DecodeCaesarBoxCipher(), Is.EqualTo(output)); }
public void Test_RunLengthEncoding2(string input, string output) { AlphabetUtility sut = new AlphabetUtility(input); Assert.That(sut.RunLengthEncoding2(), Is.EqualTo(output)); }
public void Test_ROT13Cipher(string expected, string input) { var result = AlphabetUtility.Encode_Rot13Cipher(input); Assert.That(result, Is.EqualTo(expected)); }
public void Test_GetCountOfLetters(string input, int expected) { var result = AlphabetUtility.GetCountOfLetters(input); Assert.That(result, Is.EqualTo(expected)); }
public void Test_DoLogicalOrWithCharSubtraction(string input1, string input2, string expected) { string result = AlphabetUtility.DoLogicalOrWithCharSubtraction(input1, input2); Assert.That(result, Is.EqualTo(expected)); }
public void Test_ValidateUpperCaseLowerCaseAndNumberInput(string input, string expected) { var result = AlphabetUtility.ValidateUpperCaseLowerCaseAndNumberInput(input); Assert.That(result, Is.EqualTo(expected)); }
public void Test_FindFirstNotCorrectlyPlacedLetter(string input, string output) { AlphabetUtility sut = new AlphabetUtility(input); Assert.That(sut.FindFirstNotCorrectlyPlacedLetter(), Is.EqualTo(output)); }
public void Test_Orang_utanEncoding(string input, string expected) { string result = AlphabetUtility.EncodeOrang_utan(input); Assert.That(result, Is.EqualTo(expected)); }