コード例 #1
0
 public void GetAllWithPartialNameTest()
 {
     var ds = new List<string> { "DARTFORD", "DARTMOUTH", "TOWER HILL", "DERBY" };
     var expressions = new List<string> { "DARTFORD", "DARTMOUTH" };
     var result = new DictionaryStationRepository(ds).GetAllThatStartWith("DART");
     Assert.IsTrue(expressions.SequenceEqual(result));
 }
コード例 #2
0
 public void GetAllWithMissingNameTest()
 {
     var ds = new List<string> { "EUSTON", "LONDON BRIDGE", "VICTORIA" };
     var expressions = new List<string>(0);
     var result = new DictionaryStationRepository(ds).GetAllThatStartWith("KINGS CROSS");
     Assert.IsTrue(expressions.SequenceEqual(result));
 }
コード例 #3
0
 public void GetAllWithPartialNameAndBlankSpaceTest()
 {
     var ds = new List<string> { "LIVERPOOL", "LIVERPOOL LIME STREET", "PADDINGTON" };
     var expressions = new List<string> { "LIVERPOOL", "LIVERPOOL LIME STREET" };
     var result = new DictionaryStationRepository(ds).GetAllThatStartWith("LIVERPOOL");
     Assert.IsTrue(expressions.SequenceEqual(result));
 }
コード例 #4
0
 public void GetAllWithFullNameTest()
 {
     var ds = new List<string> { "DARTFORD", "LIVERPOOL", "PADDINGTON" };
     var expressions = new List<string>{ "LIVERPOOL" };
     var result = new DictionaryStationRepository(ds).GetAllThatStartWith("LIVERPOOL");
     Assert.IsTrue(expressions.SequenceEqual(result));
 }