Skip to content

Commit

Permalink
Update DetailsViewModelMapperTests.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
alireid committed Jun 27, 2022
1 parent 82cfaff commit 9c17421
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,24 +556,6 @@ public async Task EmailOverlapIsMappedCorrectlyToDraftApprenticeshipAndToSummary
Assert.AreEqual(apprenticeshipId, course.DraftApprenticeships.First(x => x.HasOverlappingEmail).Id);
}

[Test]
public async Task EmailOverlapIsMappedCorrectlyToDraftApprenticeshipsAndToSummaryLineWhenTwoEmailOverlapsExistOnSameCourse()
{
var f = new DetailsViewModelMapperTestsFixture().WithTwoEmailOverlappingOnSameCourse();
var apprenticeshipId1 = f.EmailOverlapResponse.ApprenticeshipEmailOverlaps.First().Id;
var apprenticeshipId2 = f.EmailOverlapResponse.ApprenticeshipEmailOverlaps.Last().Id;

var result = await f.Map();
var course = result.Courses.FirstOrDefault();

Assert.NotNull(course);
Assert.NotNull(course.EmailOverlaps);
Assert.AreEqual(2, course.EmailOverlaps.NumberOfEmailOverlaps);
Assert.AreEqual(2, course.DraftApprenticeships.Count(x => x.HasOverlappingEmail));
Assert.IsTrue(course.DraftApprenticeships.First(x => x.Id == apprenticeshipId1).HasOverlappingEmail);
Assert.IsTrue(course.DraftApprenticeships.First(x => x.Id == apprenticeshipId2).HasOverlappingEmail);
}

[TestCase(true, true)]
[TestCase(false, false)]
public async Task ShowHasOverlappingUlnIsMappedCorrectlyWhenOverlap(bool hasOverlap, bool hasUlnOverlap)
Expand Down

0 comments on commit 9c17421

Please sign in to comment.