Skip to content

Commit

Permalink
cleanup unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ntruchsess committed Oct 7, 2024
1 parent c984b19 commit b77e9ca
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,12 @@ public async Task GetServiceDetailByIdUntrackedAsync_ReturnsExpectedResult()
.And.AllSatisfy(
x => x.DocumentTypeId.Should().Be(DocumentTypeId.ADDITIONAL_DETAILS)
);
offerDetail.TechnicalUserProfile.Should().NotBeEmpty().And.HaveCount(2)
.And.Satisfy(x => technicalUserRoleDatas.Single(t => t.TechnicalUserProfileId == x.TechnicalUserProfileId).UserRoles.Count() == 1,
x => technicalUserRoleDatas.Single(t => t.TechnicalUserProfileId == x.TechnicalUserProfileId).UserRoles.Count() == 2);
offerDetail.LeadPictureId.Should().NotBeEmpty();
offerDetail.TechnicalUserProfile.Should()
.HaveCount(2)
.And.Satisfy(
x => technicalUserRoleDatas.Single(t => t.TechnicalUserProfileId == x.TechnicalUserProfileId).UserRoles.Count() == 1,
x => technicalUserRoleDatas.Single(t => t.TechnicalUserProfileId == x.TechnicalUserProfileId).UserRoles.Count() == 2);
offerDetail.LeadPictureId.Should().Be(new Guid("9685f744-9d90-4102-a949-fcd0bb86f951"));
}

#endregion
Expand All @@ -468,8 +470,11 @@ public async Task GetOfferDeclineDataAsync_ReturnsExpectedResult()
// Assert
offerDetail.Should().NotBeNull();
offerDetail.OfferStatus.Should().Be(OfferStatusId.ACTIVE);
offerDetail.ActiveDocumentStatusDatas.Should().ContainEquivalentOf(
new DocumentStatusData(new Guid("0d68c68c-d689-474c-a3be-8493f99feab2"), DocumentStatusId.LOCKED));
offerDetail.ActiveDocumentStatusDatas.Should()
.HaveCount(2)
.And.Satisfy(
x => x.DocumentId == new Guid("0d68c68c-d689-474c-a3be-8493f99feab2") && x.StatusId == DocumentStatusId.LOCKED,
x => x.DocumentId == new Guid("9685f744-9d90-4102-a949-fcd0bb86f951") && x.StatusId == DocumentStatusId.LOCKED);
}

#endregion
Expand Down

0 comments on commit b77e9ca

Please sign in to comment.