use of gov.cms.ab2d.common.model.PdpClient in project ab2d by CMSgov.
the class JobProcessorUnitTest method createClient.
private PdpClient createClient() {
PdpClient pdpClient = new PdpClient();
pdpClient.setClientId("Harry_Potter");
pdpClient.setEnabled(TRUE);
pdpClient.setContract(createContract());
return pdpClient;
}
use of gov.cms.ab2d.common.model.PdpClient in project ab2d by CMSgov.
the class CoverageCheckIntegrationTest method setUp.
@BeforeEach
void setUp() {
enabledContracts = pdpClientService.getAllEnabledContracts();
enabledContracts.forEach(contract -> pdpClientService.disableClient(contract.getContractNumber()));
PdpClient client = dataSetup.setupNonStandardClient("special", "TEST", List.of("SPONSOR"));
contract = client.getContract();
contract.setAttestedOn(ATTESTATION_TIME.toOffsetDateTime());
contractRepo.saveAndFlush(contract);
}
use of gov.cms.ab2d.common.model.PdpClient in project ab2d by CMSgov.
the class CoverageCheckIntegrationTest method verifyCoverage_whenZContractIgnore.
@DisplayName("Verify coverage ignores contracts being updated")
@Test
void verifyCoverage_whenZContractIgnore() {
PdpClient client = dataSetup.setupNonStandardClient("special2", "Z5555", List.of("SPONSOR"));
Contract contract = client.getContract();
contract.setAttestedOn(ATTESTATION_TIME.toOffsetDateTime());
contract.setUpdateMode(Contract.UpdateMode.NONE);
contract.setContractType(Contract.ContractType.CLASSIC_TEST);
contractRepo.saveAndFlush(contract);
CoverageVerificationException exception = assertThrows(CoverageVerificationException.class, () -> coverageDriver.verifyCoverage());
assertFalse(exception.getAlertMessage().contains("Z5555"));
}
use of gov.cms.ab2d.common.model.PdpClient in project ab2d by CMSgov.
the class WorkerServiceDisengagementTest method createClient2.
private PdpClient createClient2() {
PdpClient pdpClient = new PdpClient();
int clientNum = getIntRandom();
pdpClient.setId((long) clientNum);
pdpClient.setClientId("testclient2" + clientNum);
pdpClient.setOrganization("testclient2" + clientNum);
pdpClient.setEnabled(true);
pdpClient.setContract(dataSetup.setupContract("TST-34"));
pdpClient = pdpClientRepository.save(pdpClient);
dataSetup.queueForCleanup(pdpClient);
return pdpClient;
}
use of gov.cms.ab2d.common.model.PdpClient in project ab2d by CMSgov.
the class WorkerServiceDisengagementTest method createClient.
private PdpClient createClient() {
PdpClient pdpClient = new PdpClient();
int clientNum = getIntRandom();
pdpClient.setId((long) clientNum);
pdpClient.setClientId("testclient" + clientNum);
pdpClient.setOrganization("testclient" + clientNum);
pdpClient.setEnabled(true);
pdpClient.setContract(dataSetup.setupContract("TST-12"));
pdpClient = pdpClientRepository.save(pdpClient);
dataSetup.queueForCleanup(pdpClient);
return pdpClient;
}
Aggregations