public void Can_Perform_GetAll_With_Params_On_DictionaryRepository() { // Arrange var provider = new PetaPocoUnitOfWorkProvider(); var unitOfWork = provider.GetUnitOfWork(); var languageRepository = new LanguageRepository(unitOfWork); var repository = new DictionaryRepository(unitOfWork, languageRepository); // Act var dictionaryItems = repository.GetAll(1, 2); // Assert Assert.That(dictionaryItems, Is.Not.Null); Assert.That(dictionaryItems.Any(), Is.True); Assert.That(dictionaryItems.Any(x => x == null), Is.False); Assert.That(dictionaryItems.Count(), Is.EqualTo(2)); }
public void Can_Perform_GetAll_On_DictionaryRepository() { // Arrange var provider = new PetaPocoUnitOfWorkProvider(); var unitOfWork = provider.GetUnitOfWork(); var languageRepository = new LanguageRepository(unitOfWork); var repository = new DictionaryRepository(unitOfWork, languageRepository); // Act var dictionaryItem = repository.Get(1); var dictionaryItems = repository.GetAll(); // Assert Assert.That(dictionaryItems, Is.Not.Null); Assert.That(dictionaryItems.Any(), Is.True); Assert.That(dictionaryItems.Any(x => x == null), Is.False); Assert.That(dictionaryItems.Count(), Is.EqualTo(2)); }