public void SingleTest() { var sut = new AutocompleteSystem(new string[] { "d", "a", "deer", "deal" }); var result = sut.Query("d"); ArraysEqual(result, new string[] { "d", "deer", "deal" }); result = sut.Query("a"); ArraysEqual(result, new string[] { "a" }); }
public void OtherTest1() { var sut = new AutocompleteSystem(new string[] { "", "d", "a", "deer", "deal", "buzzword", "buz1word" }); var result = sut.Query("buzz"); ArraysEqual(result, new string[] { "buzzword" }); }
public void NotFoundTest() { var sut = new AutocompleteSystem(new string[] { "d", "a", "deer", "deal" }); var result = sut.Query("n"); ArraysEqual(result, new string[] { }); }
public void ReferenceTest() { var sut = new AutocompleteSystem(new string[] { "dog", "deer", "deal" }); var result = sut.Query("de"); ArraysEqual(result, new string[] { "deer", "deal" }); }