public void GivenAnEmployerWhoHasNotSignedTheIncentiveTermsIsApplyingForAGrant() { var testdata = new TestData.Account.WithoutASignedAgreement(); _testDataStore.Add("HashedAccountId", testdata.HashedAccountId); _testContext.AddOrReplaceClaim(EmployerClaimTypes.Account, testdata.HashedAccountId); _testDataStore.Add("HashedAccountLegalEntityId", testdata.HashedAccountLegalEntityId); _testDataStore.Add("LegalEntity", testdata.LegalEntity); _testContext.EmployerIncentivesApi.MockServer .Given( Request .Create() .WithPath($"/accounts/{testdata.AccountId}/legalentities") .UsingGet() ) .RespondWith( Response.Create() .WithStatusCode(HttpStatusCode.OK) .WithBody(JsonConvert.SerializeObject(testdata.LegalEntities, TestHelper.DefaultSerialiserSettings))); _testContext.EmployerIncentivesApi.MockServer .Given( Request .Create() .WithPath($"/accounts/{testdata.AccountId}/legalentities/{testdata.AccountLegalEntityId}") .UsingGet() ) .RespondWith( Response.Create() .WithStatusCode(HttpStatusCode.OK) .WithBody(JsonConvert.SerializeObject(testdata.LegalEntities.First(), TestHelper.DefaultSerialiserSettings))); }
public EmployerIncentivesApiBuilder WithoutASignedAgreement() { var data = new TestData.Account.WithoutASignedAgreement(); _server .Given( Request .Create() .WithPath($"/accounts/{data.AccountId}/legalentities") .UsingGet() ) .RespondWith( Response.Create() .WithStatusCode(HttpStatusCode.OK) .WithBody(JsonConvert.SerializeObject(data.LegalEntities, TestHelper.DefaultSerialiserSettings))); _server .Given( Request .Create() .WithPath($"/accounts/{data.AccountId}/legalentities/{data.AccountLegalEntityId}") .UsingGet() ) .RespondWith( Response.Create() .WithStatusCode(HttpStatusCode.OK) .WithBody(JsonConvert.SerializeObject(data.LegalEntities.First(), TestHelper.DefaultSerialiserSettings))); AddClaim(EmployerClaimTypes.Account, data.HashedAccountId); return(this); }