public void Blank_GivesBlank() { StringReverser stringReverser = new StringReverser(); string reversedString = stringReverser.ReverseString(string.Empty); Assert.AreEqual(string.Empty, reversedString); }
private void Update() { if (checkingScores == null) { checkingScores = StartCoroutine(CheckHighScores()); } if (callbacks == null) { callbacks = StartCoroutine(CheckCallbacks()); } lambdaTest.text = "Lambdas\n<align=left>\n"; lambdaTest.text += Success(StringReverser()("TEST") == "TSET") + " string reverser returned correctly.\n"; AddSuccess()(lambdaTest); }
public void Test_Reverse() { var reverser = new StringReverser(); var reversed = reverser.Reverse("abcd"); Assert.AreEqual("dcba", reversed); }
public void ABC_GivesCBA() { StringReverser stringReverser = new StringReverser(); string reversedString = stringReverser.ReverseString("ABC"); Assert.AreEqual("CBA", reversedString); }
public void ReverseTest(string str, string expectedResult) { var revWords = new StringReverser(str); var result = revWords.Reverse(); Assert.That(result, Is.EqualTo(expectedResult)); }
public void ReturnsSingleCharacter() { StringReverser stringReverser = new StringReverser(); string result = stringReverser.Reverse("a"); string expectedResult = "a"; Assert.AreEqual(expectedResult, result); }
public void ReversesFiveCharacters() { StringReverser stringReverser = new StringReverser(); string result = stringReverser.Reverse("abcde"); string expectedResult = "edcba"; Assert.AreEqual(expectedResult, result); }
public void TestSampleCases(string expected, string input) { var sut = new StringReverser(); var actual = sut.ReverseInPlace(input); Assert.Equal(expected, actual); var actual2 = sut.ReverseInPlace2(input); Assert.Equal(expected, actual2); }
public void ReverseStringTest() { var request = new StringReverseRequest(); request.String = "backwards"; StringReverser response = new StringReverser(); var output = response.FindReverseString(request); Assert.AreEqual(output.ReversedString, "sdrawkcab"); }
public ActionResult ReversingAString(TwoWayString stringModel) { if (ModelState.IsValid) { var reverser = new StringReverser(); var text = new StringBothWays(); text.Original = stringModel.Forward; text = reverser.ReverseString(text); stringModel.Reversed = text.Backwards; return(View("ReversingAString", stringModel)); } return(View("ReversingAString")); }
public ActionResult StringReverserInput(StringReverserModel request) { if (ModelState.IsValid) { var stringFind = new StringReverser(); var stringData = new StringReverseRequest(); stringData.String = request.String; var result = stringFind.FindReverseString(stringData); return(View("StringReverserOutput", result)); } else { return(View(request)); } }
public string ReverseTest(string rev) { var reverser = new StringReverser(); return(reverser.Reverse(rev)); }
public void An_empty_string() { Assert.Equal("", StringReverser.Reverse("")); }
public void A_palindrome() { Assert.Equal("racecar", StringReverser.Reverse("racecar")); }
public void A_sentence_with_punctuation() { Assert.Equal("!yrgnuh m'I", StringReverser.Reverse("I'm hungry!")); }
public void A_capitalized_word() { Assert.Equal("nemaR", StringReverser.Reverse("Ramen")); }
public void A_word() { Assert.Equal("tobor", StringReverser.Reverse("robot")); }
public void Init() { _reverser = new StringReverser(); }