public async Task If_The_User_Is_Employer_The_Requirement_Is_By_Passed_And_HasSucceeded_Is_True() { WhenHandlingRequestFixture fixture = new WhenHandlingRequestFixture(); var context = fixture.SetWithEmployer(); //Act await fixture.Handle(context); //Assert context.HasSucceeded.Should().BeTrue(); }
public async Task If_The_User_Has_Multiple_Service_Claim_Then_The_Highest_Claim_Is_Considered() { WhenHandlingRequestFixture fixture = new WhenHandlingRequestFixture(); var context = fixture.SetWithProviderUserServiceClaims(new List <ServiceClaim> { ServiceClaim.DAV, ServiceClaim.DAC, ServiceClaim.DAB }, new MinimumServiceClaimRequirement(ServiceClaim.DAB)); //Act await fixture.Handle(context);; //Assert context.HasSucceeded.Should().BeTrue(); }
public async Task If_The_User_Has_DAB_Claim_Then_The_Requirement_Is_For_DAA_Then_HasSucceeded_Is_False( ) { WhenHandlingRequestFixture fixture = new WhenHandlingRequestFixture(); var context = fixture.SetWithProviderUserServiceClaims(new List <ServiceClaim> { ServiceClaim.DAB }, new MinimumServiceClaimRequirement(ServiceClaim.DAA)); //Act await fixture.Handle(context);; //Assert context.HasSucceeded.Should().BeFalse(); }
public async Task Verify_Minimum_Claim_Requirement( ServiceClaim userServiceClaim, ServiceClaim minimumRequirementClaim, bool hasSucceeded) { WhenHandlingRequestFixture fixture = new WhenHandlingRequestFixture(); var context = fixture.SetWithProviderUserServiceClaims(new List <ServiceClaim> { userServiceClaim }, new MinimumServiceClaimRequirement(minimumRequirementClaim)); //Act await fixture.Handle(context); //Assert context.HasSucceeded.Should().Equals(hasSucceeded); }