public void ByUserAndCompanyName() { var repo = new Core.Data.Persistor.Client(); var coll = repo.Search(new Core.Data.Search.ClientCriteria { UserId = _userId, CompanyName = "Company_C" }).ToList(); Assert.Equal(1, coll.Count()); Assert.NotNull(coll.FirstOrDefault(r => r.Id == Guid.Parse("FB642139-0640-4359-B94E-A5A948E78E89"))); }
public void ByPageAndPageSize() { var repo = new Core.Data.Persistor.Client(); var coll = repo.Search(new Core.Data.Search.ClientCriteria { UserId = _userId, Page = 1, PageSize = 2 }).ToList(); Assert.Equal(2, coll.Count()); Assert.Null(coll.FirstOrDefault(c => c.Id == _badClientId)); }
public void ByUser() { var repo = new Core.Data.Persistor.Client(); var coll = repo.Search(new Core.Data.Search.ClientCriteria { UserId = _userId }).ToList(); Assert.Equal(4, coll.Count()); foreach (var clientId in _clients.Select(client => client.Key)) { var id = clientId; Assert.NotNull(coll.FirstOrDefault(r => r.Id == id)); } }