public void shouldGetGenderTypes() { var genderTypeRepositoryMock = new Mock<IGenderTypeRepository>(); var expectedGenderTypes = new List<GenderType>(); genderTypeRepositoryMock.Setup(x => x.GetAll()).Returns(expectedGenderTypes); var result = new GenderTypeBusinessLogic(genderTypeRepositoryMock.Object).GetGenderTypes(); Assert.That(result, Is.SameAs(expectedGenderTypes)); }
public void shouldGetGenderType() { var genderTypeRepositoryMock = new Mock<IGenderTypeRepository>(); var expectedGenderType = new GenderType(); genderTypeRepositoryMock.Setup(x => x.GetByName(It.IsAny<string>())).Returns(expectedGenderType); var result = new GenderTypeBusinessLogic(genderTypeRepositoryMock.Object).GetGenderType("Man"); Assert.That(result, Is.SameAs(expectedGenderType)); }