public GetStringDemo ( string first, string second ) : string | ||
first | string | |
second | string | |
return | string |
public void TestGetStringDemoExceptions() { var sample = new StringSample(string.Empty); Assert.Throws<ArgumentNullException>(() => sample.GetStringDemo(null, "a")); Assert.Throws<ArgumentNullException>(() => sample.GetStringDemo("a", null)); Assert.Throws<ArgumentException>(() => sample.GetStringDemo(string.Empty, "a")); }
public void TestGetStringDemoAB() { string expected = "b not found in a"; var sample = new StringSample(String.Empty); string actual = sample.GetStringDemo("a", "b"); Assert.Equal(expected, actual); }
public void TestGetStringDemoUsingMember(string init, string a, string b, string expected) { var sample = new StringSample(init); string actual = sample.GetStringDemo(a, b); Assert.Equal(expected, actual); }