public void GetWeekNumberOfYear_WeekOfYear_ReturnsExpectedValue( DateTime dateTime, int expected) { // Arrange var dateTimeTest = dateTime; // Act var service = new ParityOfTheWeekService(_parityOfTheWeekConfigurationModel.Object, _mockMapper.Object);; var result = service.GetWeekNumberOfYear(dateTimeTest); // Assert Assert.Equal(expected, result); }
public void GetWeekNumberOfYear_ReturnsWeekOfYear_ShouldBeReturns_45() { // 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.GetWeekNumberOfYear(dateTimeTest); // Assert Assert.AreEqual(45, result); }