Search in sources :

Example 81 with EnumSource

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);
}
Also used : Context(io.aeron.archive.Archive.Context) CommonContext(io.aeron.CommonContext) AeronArchive(io.aeron.archive.client.AeronArchive) Checksum(io.aeron.archive.checksum.Checksum) UnsafeBuffer(org.agrona.concurrent.UnsafeBuffer) Context(io.aeron.archive.Archive.Context) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 82 with EnumSource

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());
}
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 83 with EnumSource

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);
}
Also used : Node(gov.cms.qpp.conversion.model.Node) EnumSource(org.junit.jupiter.params.provider.EnumSource) DisplayName(org.junit.jupiter.api.DisplayName) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 84 with EnumSource

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);
}
Also used : Context(gov.cms.qpp.conversion.Context) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 85 with EnumSource

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);
    }
}
Also used : AtomicOutputStream(org.apache.storm.blobstore.AtomicOutputStream) SettableBlobMeta(org.apache.storm.generated.SettableBlobMeta) BlobStore(org.apache.storm.blobstore.BlobStore) EnumSource(org.junit.jupiter.params.provider.EnumSource) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Aggregations

EnumSource (org.junit.jupiter.params.provider.EnumSource)397 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)393 Account (io.nem.symbol.sdk.model.account.Account)40 TransferTransaction (io.nem.symbol.sdk.model.transaction.TransferTransaction)38 SignedTransaction (io.nem.symbol.sdk.model.transaction.SignedTransaction)34 Transaction (io.nem.symbol.sdk.model.transaction.Transaction)34 Address (io.nem.symbol.sdk.model.account.Address)30 AggregateTransaction (io.nem.symbol.sdk.model.transaction.AggregateTransaction)27 TransactionRepository (io.nem.symbol.sdk.api.TransactionRepository)26 TransactionSearchCriteria (io.nem.symbol.sdk.api.TransactionSearchCriteria)26 BigInteger (java.math.BigInteger)25 MosaicId (io.nem.symbol.sdk.model.mosaic.MosaicId)23 KernelTransaction (org.neo4j.kernel.api.KernelTransaction)23 EntityUpdates (org.neo4j.storageengine.api.EntityUpdates)21 RepositoryFactory (io.nem.symbol.sdk.api.RepositoryFactory)19 Path (java.nio.file.Path)18 ArrayList (java.util.ArrayList)16 Listener (io.nem.symbol.sdk.api.Listener)15 PlainMessage (io.nem.symbol.sdk.model.message.PlainMessage)15 NamespaceId (io.nem.symbol.sdk.model.namespace.NamespaceId)14