public void GenerateCorrectAcademicYears(DateTime today, int expectedCurrentYear, int expectedPreviousYear) { var model = new AcademicYear(today); model.Should().Be((AcademicYear)expectedCurrentYear); (model - 1).Should().Be((AcademicYear)expectedPreviousYear); }
public void MapAcademicYear() { var academicYearLookup = new AcademicYear { AugustThirtyFirst = new DateTime(2018, 8, 31), End = new DateTime(2019, 7, 31), JanuaryFirst = new DateTime(2019, 1, 1), JulyThirtyFirst = new DateTime(2019, 7, 31), Start = new DateTime(2018, 8, 1) }; var expectedAademicYearLookup = new AcademicYear { AugustThirtyFirst = new DateTime(2018, 8, 31), End = new DateTime(2019, 7, 31), JanuaryFirst = new DateTime(2019, 1, 1), JulyThirtyFirst = new DateTime(2019, 7, 31), Start = new DateTime(2018, 8, 1) }; expectedAademicYearLookup.Should().BeEquivalentTo(NewMapper().MapAcademicYear(academicYearLookup)); }