public void Try_mississippi_sippia_SolutionOne_Succeed() { var str = new StrStr("mississippi", "sippia"); var result = str.SolutionOne(); Assert.AreEqual(-1, result); }
public void Try_aaa_aaaa_SolutionOne_Succeed() { var str = new StrStr("aaa", "aaaa"); var result = str.SolutionOne(); Assert.AreEqual(-1, result); }
public void Try_hello_SolutionOne_Succeed() { var str = new StrStr("hello", "ll"); var result = str.SolutionOne(); Assert.AreEqual(2, result); }
public void Try_EmptyHayStackAndNeedle_SolutionOne_Succeed() { var str = new StrStr("", ""); var result = str.SolutionOne(); Assert.AreEqual(0, result); }
public void Try_abracadabra_SolutionOne_Succeed() { var str = new StrStr("abracadabra", "abra"); var result = str.SolutionOne(); Assert.AreEqual(0, result); }
public int StrStr(string haystack, string needle) { var sol = new StrStr(haystack,needle); return sol.SolutionOne(); }