public void MakeAbbaTestHappyPath() { //makeAbba("Hi", "Bye") → "HiByeByeHi" //makeAbba("Yo", "Alice") → "YoAliceAliceYo" //makeAbba("What", "Up") → "WhatUpUpWhat" //makeAbba("Henry","Mimi) -> "HenryMimiMimiHenry" //makeAbba("Tech","Elevator") -> "TechElevatorElevatorTech" // Arrange StringExercises stringExercises = new StringExercises(); string expected = "HiByeByeHi"; string inputOne = "Hi"; string inputTwo = "Bye"; string result = ""; // Act result = stringExercises.MakeAbba(inputOne, inputTwo); // Assert Assert.AreEqual(expected, result); // let's do another inputOne = "Henry"; inputTwo = "Mimi"; expected = "HenryMimiMimiHenry"; // Act result = stringExercises.MakeAbba(inputOne, inputTwo); // Assert Assert.AreEqual(expected, result); }
public void MakeOutWordTest() { StringExercises testClass = new StringExercises(); string result = testClass.MakeOutWord("<<>>", "Yay"); Assert.AreEqual("<<Yay>>", result); }
public void TestFirstTwoWithShortStrings() { StringExercises stringExercises = new StringExercises(); Assert.AreEqual("a", stringExercises.FirstTwo("a")); Assert.AreEqual("", stringExercises.FirstTwo("")); Assert.AreEqual(null, stringExercises.FirstTwo(null)); }
public void FirstTwoTestShorterString() { StringExercises stringExercises = new StringExercises(); string actual = stringExercises.FirstTwo("a"); Assert.AreEqual("a", actual); }
public void FirstTwoTest() { //arrange StringExercises stringExercises = new StringExercises(); string actual = stringExercises.FirstTwo("Hello"); Assert.AreEqual("He", actual); }
public void MakeAbbaTest() { // Arrange Act Assert StringExercises stringExercises = new StringExercises(); string actual = stringExercises.MakeAbba("Hi", "Bye"); Assert.AreEqual("HiByeByeHi", actual); }
public void MakeAbbaWithOneCharacterNull() { //arrange StringExercises stringExercises = new StringExercises(); //act string actual = stringExercises.MakeAbba("A", null); //assert Assert.AreEqual("AA", actual, "you're doing great, keep trying"); }
public void MakeAbbaYoAdrian() { // Arrange StringExercises exercise = new StringExercises(); // Act string actualResult = exercise.MakeAbba("Yo", "Adrian"); // Assert Assert.AreEqual("YoAdrianAdrianYo", actualResult); }
public void TestMakeOutWordWithNull() { //arrange StringExercises stringExercises = new StringExercises(); //act string result = stringExercises.MakeOutWord(null, null); //assert Assert.IsNull(result); }
public void MakeAbba() { // Arrange StringExercises exercise = new StringExercises(); // Act string actualResult = exercise.MakeAbba("Hi", "Bye"); // Assert Assert.AreEqual("HiByeByeHi", actualResult); }
public void TestMakeOutWord() { //arrange StringExercises strExer = new StringExercises(); //act string result = strExer.MakeOutWord("<<>>", "Bye"); //assert Assert.AreEqual("<<Bye>>", result); }
public void TestFirstTwo() { //firstTwo("Hello") → "He" //firstTwo("abcdefg") → "ab" //firstTwo("ab") → "ab" StringExercises stringExercises = new StringExercises(); Assert.AreEqual("He", stringExercises.FirstTwo("Hello")); Assert.AreEqual("ab", stringExercises.FirstTwo("abcdefg")); Assert.AreEqual("ab", stringExercises.FirstTwo("ab")); }
public void MakeAbbaTest() { //Arrange StringExercises se = new StringExercises(); //Act string output = se.MakeAbba("Josh", "Tucholski"); //Assert Assert.AreEqual("JoshTucholskiTucholskiJosh", output); }
public void Run_makeabba_YoAdrian_should_return_YoAdrianAdrianYo() { // Arrange StringExercises ex = new StringExercises(); // Act string actualResult = ex.MakeAbba("Yo", "Adrian"); // Assert Assert.AreEqual("YoAdrianAdrianYo", actualResult); }
public void MakeAbbaTests(string stringA, string stringB, string expectedResult) { // Arrange StringExercises ex = new StringExercises(); //Act string actualResult = ex.MakeAbba(stringA, stringB); //Assert Assert.AreEqual(expectedResult, actualResult); }
public void FirstTwoTests(string str, string expectedResult) { // Arrange StringExercises ex = new StringExercises(); // Act string actualResult = ex.FirstTwo(str); // Assert Assert.AreEqual(expectedResult, actualResult); }
public void Run_makeabba_HiBye_should_return_HiByeByeHi() { // Arrange StringExercises ex = new StringExercises(); // Act string actualResult = ex.MakeAbba("Hi", "Bye"); // Assert Assert.AreEqual("HiByeByeHi", actualResult); }
public void DataTestMakeAbba(string input1, string input2, string expectedResult) { // Arrange StringExercises ex = new StringExercises(); // Act string actualResult = ex.MakeAbba(input1, input2); // Assert Assert.AreEqual(expectedResult, actualResult); }
public void TestMakeAbbaSpaceFirstString() { // Arrange StringExercises ex = new StringExercises(); // Act string actualResult = ex.MakeAbba(" ", "Yeah"); // Assert Assert.AreEqual(" YeahYeah ", actualResult); }
public void MakeAbbaTest() { StringExercises stringExercises = new StringExercises(); string result = stringExercises.MakeAbba("Hi", "Bye"); Assert.AreEqual("HiByeByeHi", result); result = stringExercises.MakeAbba("Yo", "Alice"); Assert.AreEqual("YoAliceAliceYo", result); result = stringExercises.MakeAbba("What", "Up"); Assert.AreEqual("WhatUpUpWhat", result); }
public void FirstTwoTest() { //firstTwo("Hello") → "He" //firstTwo("abcdefg") → "ab" //firstTwo("ab") → "ab" //Arrange StringExercises stringExercises = new StringExercises(); //Assert Assert.AreEqual("He", stringExercises.FirstTwo("Hello")); Assert.AreEqual("ab", stringExercises.FirstTwo("abcdefg")); Assert.AreEqual("ab", stringExercises.FirstTwo("ab")); }
public void MakeOutWordTest() { StringExercises testClass = new StringExercises(); string result = testClass.MakeOutWord("<<>>", "Yay"); Assert.AreEqual("<<Yay>>", result); result = testClass.MakeOutWord("<<>>", "WooHoo"); Assert.AreEqual("<<WooHoo>>", result); result = testClass.MakeOutWord("[[]]", "word"); Assert.AreEqual("[[word]]", result); }
public void TestMakeOutWord() { //makeOutWord("<<>>", "Yay") → "<<Yay>>" //makeOutWord("<<>>", "WooHoo") → "<<WooHoo>>" //makeOutWord("[[]]", "word") → "[[word]]" //Arrange StringExercises stringExercises = new StringExercises(); //Act string result = stringExercises.MakeOutWord("<<>>", "Yay"); //Assert Assert.AreEqual("<<Yay>>", result, "d'oh"); }
public void FirstTwoTest() { // firstTwo("Hello") → "He" // firstTwo("abcdefg") → "ab" //firstTwo("ab") → "ab" StringExercises FirstTwoTest = new StringExercises(); Assert.AreEqual("He", FirstTwoTest.FirstTwo("Hello")); Assert.AreEqual("ab", FirstTwoTest.FirstTwo("abcdefg")); Assert.AreEqual("ab", FirstTwoTest.FirstTwo("ab")); Assert.AreEqual("", FirstTwoTest.FirstTwo("")); }
public void TestMakeAbba1() { //makeAbba("Hi", "Bye") "HiByeByeHi" //makeAbba("Yo", "Alice") "YoAliceAliceYo" //makeAbba("What", "Up") "WhatUpUpWhat" // Arrange // Create an instance of StringExercise StringExercises ex = new StringExercises(); // Act string actualResult = ex.MakeAbba("Hi", "Bye"); // Assert Assert.AreEqual("HiByeByeHi", actualResult); }
public void MakeAbbaTest() { //makeAbba("Hi", "Bye") → "HiByeByeHi" //makeAbba("Yo", "Alice") → "YoAliceAliceYo" //makeAbba("What", "Up") → "WhatUpUpWhat" StringExercises stringExercises = new StringExercises(); string result = stringExercises.MakeAbba("Hi", "Bye"); Assert.AreEqual("HiByeByeHi", result); result = stringExercises.MakeAbba("Yo", "Alice"); Assert.AreEqual("YoAliceAliceYo", result); Assert.AreEqual("WhatUpUpWhat", stringExercises.MakeAbba("What", "Up"), "Please try agin, cutie!"); }
public void MakeAbbaTest() { //makeAbba("Hi", "Bye") → "HiByeByeHi" //makeAbba("Yo", "Alice") → "YoAliceAliceYo" //makeAbba("What", "Up") → "WhatUpUpWhat" //Arrange StringExercises stringExercises = new StringExercises(); //Act string result = stringExercises.MakeAbba("Hi", "Bye"); //Assert Assert.AreEqual("HiByeByeHi", result); Assert.AreEqual("YoAliceAliceYo", stringExercises.MakeAbba("Yo", "Alice")); }
public void MakeAbbaTest() { /* * Arrange * Act * Assert */ //arrange StringExercises stringExercises = new StringExercises(); //act string actual = stringExercises.MakeAbba("Hi", "Bye"); //assert Assert.AreEqual("HiByeByeHi", actual); string actual2 = stringExercises.MakeAbba("A", "B"); //assert Assert.AreEqual("ABBA", actual2); }
public void MakeAbbaTest() { /// makeAbba("Hi", "Bye") → HiByeByeHi ///makeAbba("What", "Up") → "WhatUpUpWhat" /// makeAbba("Yo", "Alice") → "YoAliceAliceYo" //ARANGEEE StringExercises stringExercises = new StringExercises(); //ACTTTTT string result = stringExercises.MakeAbba("Hi", "Bye"); //ASSERTTTT Assert.AreEqual("HiByeByeHi", result); Assert.AreEqual("YoAliceAliceYo", stringExercises.MakeAbba("Yo", "Alice")); Assert.AreEqual("WhatUpUpWhat", stringExercises.MakeAbba("What", "Up")); }
public void MakeAbbaTest() { //makeAbba("Hi", "Bye") → "HiByeByeHi" //makeAbba("Yo", "Alice") → "YoAliceAliceYo" //makeAbba("What", "Up") → "WhatUpUpWhat" // Arrange var obj = new StringExercises(); // Act var result = obj.MakeAbba("Hi", "Bye"); // These are various possible edge cases for the method MakeAbba //obj.MakeAbba("", "Bye"); //obj.MakeAbba("Hi", ""); //obj.MakeAbba("", ""); //obj.MakeAbba(null,""); //obj.MakeAbba(null, null); //obj.MakeAbba("", null); // Assert Assert.AreEqual("HiByeByeHi", result, "Was expecting ABBA format."); // Act result = obj.MakeAbba("Yo", "Alice"); // Assert Assert.AreEqual("YoAliceAliceYo", result, "Was expecting ABBA format."); // Act result = obj.MakeAbba("What", "Up"); // Assert Assert.AreEqual("WhatUpUpWhat", result, "Was expecting ABBA format."); //Assert.AreEqual("HiByeByeHi", obj.MakeAbba("Hi", "Bye"), "Was expecting ABBA format."); //Assert.AreEqual("YoAliceAliceYo", obj.MakeAbba("Yo", "Alice"), "Was expecting ABBA format."); //Assert.AreEqual("WhatUpUpWhat", obj.MakeAbba("What", "Up"), "Was expecting ABBA format."); }