public void IsMatching_should_return_correct_value(string alias, string expression, int expectedCount, bool useCaseSensitive) { var queryFactory = new QueryFactory(useCaseSensitive); Visit visit = CreateVisit(alias); Database.Add(visit.Alias.ShortUrl); Database.Add(visit.Alias); var repo = new VisitRepository(DatabaseFactory, queryFactory); repo.Add(visit); int count = repo.Count(expression); Assert.Equal(expectedCount, count); }
public void LoadData() { view.bindingList = repository.GetAllVisits(view.pageNumber, view.itemsPerPage, view.search, view.sortBy, view.ascending); view.totalItems = repository.Count(); }