public void GeneretePolindrom_EqualSides() { var palindrom = TextGenerator.GeneratePalindrom(Length); var centerLength = (int)(Length * 0.5); var leftSide = palindrom.Substring(0, centerLength); var right = palindrom.Substring(centerLength, Length - centerLength); var rightSide = string.Concat(right.Reverse()); Assert.AreEqual(leftSide, rightSide); }
public void GenerateString_EqualLength() { var generatedString = TextGenerator.GenerateString(Length); Assert.IsTrue(generatedString.Length == Length); var palindrom = TextGenerator.GeneratePalindrom(Length); Assert.IsTrue(palindrom.Length == Length); }