public void GetPartOfSemester_PartOFSemester_ReturnsExpectedValue( DateTime dateTime, int expected) { // Arrange var dateTimeTest = dateTime; // new DateTime(2018, 11, 11); // Act var service = new ParityOfTheWeekService(_parityOfTheWeekConfigurationModel.Object, _mockMapper.Object); var result = service.GetPartOfSemester(dateTimeTest); // Assert Assert.Equal(expected, result); }
public void GetPartOfSemester_ReturnsPartOFSemester_ShouldBeReturns_1() { // Arrange var fixture = new Fixture(); fixture.Customize(new AutoMoqCustomization()); var dateTimeTest = new DateTime(2018, 11, 11); var mapper = fixture.Freeze <Mock <IMapper> >(); var parityOfTheWeekConfigurationModel = fixture.Freeze <Mock <ParityOfTheWeekConfigurationModel> >(); // Act var service = new ParityOfTheWeekService(mapper.Object, parityOfTheWeekConfigurationModel.Object); var result = service.GetPartOfSemester(dateTimeTest); // Assert Assert.AreEqual(1, result); }