private async void _textChangedAsync() { await Task.Run(() => { Matches = (from haltestelle in _mapper.FindByName(SearchText) select haltestelle).ToList(); }); }
public void TestFindByName() { Assert.AreEqual(0, _mapperReal.FindByName("").Count); Assert.AreEqual(0, _mapperReal.FindByName(" ").Count); Assert.AreEqual(0, _mapperReal.FindByName(" ").Count); Assert.AreEqual(3, _mapperReal.FindByName("hauptbahnhof").Count); Assert.AreEqual(2, _mapperReal.FindByName("neustadt").Count); Assert.AreEqual(1, _mapperReal.FindByName("asd").Count); Assert.IsTrue(_mapperReal.FindByName("hauptbahnhof").Contains(hauptbahnhof)); Assert.IsTrue(_mapperReal.FindByName("hauptbahnhof").Contains(hauptbahnhofOst)); }