Search in sources :

Example 6 with EnumSource

use of org.junit.jupiter.params.provider.EnumSource in project harvest-client by 3AP-AG.

the class ProjectsApiCreateTest method createDefaultBilling.

@ParameterizedTest
@EnumSource(Project.BillingMethod.class)
void createDefaultBilling(Project.BillingMethod billingMethod, TestInfo testInfo) {
    Reference<Client> clientReference = ExistingData.getInstance().getClientReference();
    String name = "Project for test " + testInfo.getDisplayName();
    boolean billable = true;
    Project.BudgetMethod budgetBy = Project.BudgetMethod.HOURS_PER_PROJECT;
    Project creationInfo = ImmutableProject.builder().client(clientReference).name(name).billable(billable).billBy(billingMethod).budgetBy(budgetBy).build();
    project = projectsApi.create(creationInfo);
    assertThat(project.getBillable()).isEqualTo(billable);
    assertThat(project.getBillBy()).isEqualTo(billingMethod);
    assertThat(project.getBudgetBy()).isEqualTo(budgetBy);
    assertThat(project.getName()).isEqualTo(name);
    assertThat(project.getClient().getId()).isEqualTo(clientReference.getId());
}
Also used : Project(ch.aaap.harvestclient.domain.Project) ImmutableProject(ch.aaap.harvestclient.domain.ImmutableProject) Client(ch.aaap.harvestclient.domain.Client) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 7 with EnumSource

use of org.junit.jupiter.params.provider.EnumSource in project qpp-conversion-tool by CMSgov.

the class TemplateIdTest method testInvalidExtensionFindWithNoExtensionEnforcement.

@ParameterizedTest
@EnumSource(value = TemplateId.class, mode = EXCLUDE, names = { "CLINICAL_DOCUMENT" })
void testInvalidExtensionFindWithNoExtensionEnforcement(TemplateId templateId) {
    TemplateId actual = TemplateId.getTemplateId(templateId.getRoot(), "nonExistingExtension", new Context());
    assertThat(actual).isSameAs(templateId);
}
Also used : Context(gov.cms.qpp.conversion.Context) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)7 EnumSource (org.junit.jupiter.params.provider.EnumSource)7 Client (ch.aaap.harvestclient.domain.Client)2 ImmutableProject (ch.aaap.harvestclient.domain.ImmutableProject)2 Project (ch.aaap.harvestclient.domain.Project)2 Context (gov.cms.qpp.conversion.Context)2 ICombatEntity (de.gurkenlabs.litiengine.entities.ICombatEntity)1 Node (gov.cms.qpp.conversion.model.Node)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 DisplayName (org.junit.jupiter.api.DisplayName)1