use of org.junit.jupiter.params.provider.EnumSource in project aeron by real-logic.
the class ArchiveTest method recordChecksumBufferReturnsDataBufferIfThreadingModeIsNotDEDICATED.
@ParameterizedTest
@EnumSource(value = ArchiveThreadingMode.class, mode = EXCLUDE, names = "DEDICATED")
void recordChecksumBufferReturnsDataBufferIfThreadingModeIsNotDEDICATED(final ArchiveThreadingMode threadingMode) {
final Checksum recordChecksum = mock(Checksum.class);
final Archive.Context context = new Archive.Context().recordChecksum(recordChecksum).threadingMode(threadingMode);
final UnsafeBuffer buffer = context.recordChecksumBuffer();
assertSame(context.dataBuffer(), buffer);
}
use of org.junit.jupiter.params.provider.EnumSource in project harvest-client by 3AP-AG.
the class ProjectsApiCreateTest method createDefaultBudget.
@ParameterizedTest
@EnumSource(Project.BudgetMethod.class)
void createDefaultBudget(Project.BudgetMethod budgetMethod, TestInfo testInfo) {
Reference<Client> clientReference = ExistingData.getInstance().getClientReference();
String name = "Project for test " + testInfo.getDisplayName();
boolean billable = true;
Project.BillingMethod billBy = Project.BillingMethod.PROJECT;
Project creationInfo = ImmutableProject.builder().client(clientReference).name(name).billable(billable).billBy(billBy).budgetBy(budgetMethod).build();
project = projectsApi.create(creationInfo);
assertThat(project.getBillable()).isEqualTo(billable);
assertThat(project.getBillBy()).isEqualTo(billBy);
assertThat(project.getBudgetBy()).isEqualTo(budgetMethod);
assertThat(project.getName()).isEqualTo(name);
assertThat(project.getClient().getId()).isEqualTo(clientReference.getId());
}
use of org.junit.jupiter.params.provider.EnumSource in project qpp-conversion-tool by CMSgov.
the class MeasureDataEncoderTest method testDenominator.
@DisplayName("Verify measure data retrieval")
@ParameterizedTest(name = "retrieval of ''{0}''")
@EnumSource(Fixture.class)
void testDenominator(Fixture fixture) throws EncodeException {
Node measureDataNode = setUpMeasureDataNode(fixture.name());
JsonWrapper jsonWrapper = encode(measureDataNode);
assertThat(jsonWrapper.getInteger(fixture.value)).isEqualTo(900);
}
use of org.junit.jupiter.params.provider.EnumSource in project qpp-conversion-tool by CMSgov.
the class TemplateIdTest method testInvalidExtensionFindWithExtensionEnforcementHappy.
@ParameterizedTest
@EnumSource(value = TemplateId.class)
void testInvalidExtensionFindWithExtensionEnforcementHappy(TemplateId templateId) {
System.setProperty(Extension.STRICT_EXTENSION, "yep");
TemplateId actual = TemplateId.getTemplateId(templateId.getRoot(), templateId.getExtension(), new Context());
assertThat(actual).isSameAs(templateId);
}
use of org.junit.jupiter.params.provider.EnumSource in project storm by apache.
the class BlobStoreTest method testWithAuthentication.
@ParameterizedTest
@EnumSource(value = AuthenticationTestSubject.class)
void testWithAuthentication(AuthenticationTestSubject testSubject) throws Exception {
try (AutoCloseableBlobStoreContainer container = initHdfs("/storm/blobstore-auth-" + testSubject.name())) {
BlobStore store = container.blobStore;
assertStoreHasExactly(store);
SettableBlobMeta metadata = new SettableBlobMeta(BlobStoreAclHandler.DEFAULT);
try (AtomicOutputStream out = store.createBlob("test", metadata, testSubject.subject)) {
assertStoreHasExactly(store, "test");
out.write(1);
}
store.deleteBlob("test", testSubject.subject);
}
}
Aggregations