public void Map_GivenValidSource_WithApprovalDate_PropertiesShouldBeMapped() { AatfData aatfData = CreateAatfData(); var transfer = new AatfDataToAatfDetailsViewModelMapTransfer(aatfData); AatfDetailsViewModel result = map.Map(transfer); AssertResults(aatfData, result); Assert.NotNull(result.ApprovalDate); }
public void Map_GivenValidSource_WithNoApprovalDate_PropertiesShouldBeMapped_ApprovalDateShouldBeDefaultDatetime() { AatfData aatfData = CreateAatfData(); aatfData.ApprovalDate = default(DateTime); var transfer = new AatfDataToAatfDetailsViewModelMapTransfer(aatfData); AatfDetailsViewModel result = map.Map(transfer); AssertResults(aatfData, result); Assert.Null(result.ApprovalDate); }
public void Map_GivenValidSource_WithCurrentDate_PropertiesShouldBeMapped() { AatfData aatfData = CreateAatfData(); var date = DateTime.UtcNow; var transfer = new AatfDataToAatfDetailsViewModelMapTransfer(aatfData) { CurrentDate = date, }; AatfDetailsViewModel result = map.Map(transfer); result.CurrentDate.Should().Be(date); }
public void Map_GivenValidSource_WithComplianceYears_PropertiesShouldBeMapped() { AatfData aatfData = CreateAatfData(); var complianceYears = A.Fake <List <short> >(); var transfer = new AatfDataToAatfDetailsViewModelMapTransfer(aatfData) { ComplianceYearList = complianceYears, }; AatfDetailsViewModel result = map.Map(transfer); result.ComplianceYearList.Should().BeEquivalentTo(complianceYears); }