public void test10() { // Here the first three parameters have valid values so we don't care about Jesus string s = CSharpMethods.SuperRepeaty("Ko", true, 4, "Jesus"); Assert.AreEqual("*KoKoKoKo*", s); }
public void test9() { // Similar as above string s = CSharpMethods.SuperRepeaty(null, true, 5, "Jesus"); Assert.AreEqual("Jesus", s); }
public void test8() { // If a 4th parameter is used then you shouldn't give an ArgumentException // Instead return the 4th parameter string s = CSharpMethods.SuperRepeaty("Abc", true, -3, "Panda"); Assert.AreEqual("Panda", s); }
public void test7() { // Here null is supplied so the method should give an ArgumentException Assert.ThrowsException <ArgumentException>(() => CSharpMethods.SuperRepeaty(null, true, 5) ); }
public void test6() { // Here a negative number is supplied so the method should give an ArgumentException Assert.ThrowsException <ArgumentException>(() => CSharpMethods.SuperRepeaty("Abc", true, -3) ); }
public void test5() { string s = CSharpMethods.Repeaty("", true, 0); Assert.AreEqual("**", s); }
public void test4() { string s = CSharpMethods.Repeaty("CAT", true, 1); Assert.AreEqual("*CAT*", s); }
public void test3() { string s = CSharpMethods.Repeaty("Abcde", true, 4); Assert.AreEqual("*AbcdeAbcdeAbcdeAbcde*", s); }
public void test2() { string s = CSharpMethods.Repeaty("Abcde", false, 4); Assert.AreEqual("AbcdeAbcdeAbcdeAbcde", s); }
public void test1() { string s = CSharpMethods.Repeaty("Xyz", false, 2); Assert.AreEqual("XyzXyz", s); }