public void HouseholdRepository_ShouldCallGetAllOnce_WhenGetAllIsCalled() { // Arrange var householdService = new HouseholdService(unitOfWorkMock.Object, householdRepoMock.Object, userRepoMock.Object, householdFactoryMock.Object); // Act householdService.GetAll(); // Assert this.householdRepoMock.Verify(x => x.GetAll(), Times.Once); }
public void GetAll_ShouldReturnIEnumerableOfHouseholds_WhenCalled() { // Arrange var householdService = new HouseholdService(unitOfWorkMock.Object, householdRepoMock.Object, userRepoMock.Object, householdFactoryMock.Object); // Act var result = householdService.GetAll(); // Assert Assert.IsInstanceOf <IEnumerable <Household> >(result); }