Esempio n. 1
0
 public void GivenTest(ISolution solution)
 {
     solution.Add("dog");
     solution.Add("deer");
     solution.Add("deal");
     Assert.Equal(new string[] { "deer", "deal" }, solution.Search("de"));
 }
Esempio n. 2
0
 public void NullSearch(ISolution solution)
 {
     solution.Add("abc");
     solution.Add("def");
     solution.Add("hij");
     Assert.Equal(new string[0], solution.Search(null));
 }
Esempio n. 3
0
 public void NoMatch(ISolution solution)
 {
     solution.Add("abc");
     solution.Add("def");
     solution.Add("hij");
     Assert.Equal(new string[0], solution.Search("abcdefhij"));
 }
Esempio n. 4
0
 public void NullEntry(ISolution solution)
 {
     solution.Add(null);
     solution.Add("def");
     solution.Add("hij");
     Assert.Equal(new string[] { "def" }, solution.Search("de"));
 }
Esempio n. 5
0
 public void ReoccouringChars(ISolution solution)
 {
     solution.Add("abcabcabc");
     solution.Add("bcbcbc");
     solution.Add("cccccc");
     Assert.Equal(new string[] { "abcabcabc", "bcbcbc" }, solution.Search("bc"));
 }
Esempio n. 6
0
 public void MiddleMatch(ISolution solution)
 {
     solution.Add("abcdefgh");
     solution.Add("abcdfgh");
     solution.Add("cdfh");
     Assert.Equal(new string[] { "abcdefgh", "abcdfgh" }, solution.Search("fg"));
 }
Esempio n. 7
0
 public void EndingMatch(ISolution solution)
 {
     solution.Add("abce");
     solution.Add("abde");
     solution.Add("acde");
     Assert.Equal(new string[] { "abde", "acde" }, solution.Search("de"));
 }
Esempio n. 8
0
 public void EmptyEntryString(ISolution solution)
 {
     solution.Add("");
     solution.Add("def");
     solution.Add("hij");
     Assert.Equal(new string[0], solution.Search(""));
     Assert.Equal(new string[] { "def" }, solution.Search("de"));
 }
Esempio n. 9
0
 public void GlobalSetup()
 {
     entry = new string('B', entryLength);
     searchTree.Add(entry);
 }
Esempio n. 10
0
 public int Add(params int[] input) => _sut.Add(input);