public void IsPalindrome_RemovePunctuation_true() { //Arrange string phrase = "God! A red nugget! A fat egg under a dog!"; Palindrome newPalindrome = new Palindrome(phrase); //Act //Assert Assert.Equal(true, newPalindrome.IsPalindrome()); }
public void IsPalindrome_RemoveSpaces_true() { //Arrange string word = "Taco cat"; Palindrome newPalindrome = new Palindrome(word); //Act //Assert Assert.Equal(true, newPalindrome.IsPalindrome()); }
public HomeModule() { Get["/"] = _ => { return(View["index.cshtml"]); }; Post["/"] = _ => { string userInput = Request.Form["initial-word"]; Palindrome newPalindrome = new Palindrome(userInput); string userOutput = newPalindrome.PalindromeMethod(); return(View["index.cshtml", userOutput]); }; }
public HomeModule() { Get["/"] = _ => { return(View["index.cshtml"]); }; Post["/result"] = _ => { Palindrome myPalindrome = new Palindrome(Request.Form["string"]); bool isPalindrome = myPalindrome.IsPalindrome(); myPalindrome.Truthy = isPalindrome; return(View["results.cshtml", myPalindrome]); }; }
public static void Main() { Palindrome newPalindrome = new Palindrome(); newPalindrome.GetUserInput(); if (newPalindrome.PalindromeCheck()) { Console.WriteLine("{0} is a palindrome!", newPalindrome.GetUserArray()); } else { Console.WriteLine("{0} is NOT a palindrome!", newPalindrome.GetUserArray()); } }