All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.ikor.sip.foundation.testkit.util.SIPBatchTestArgumentSource Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version
package de.ikor.sip.foundation.testkit.util;

import static org.junit.jupiter.api.Named.named;
import static org.junit.jupiter.params.provider.Arguments.arguments;

import de.ikor.sip.foundation.testkit.SIPBatchTest;
import java.util.stream.Stream;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.ArgumentsProvider;

public class SIPBatchTestArgumentSource implements ArgumentsProvider {

  @Override
  public Stream provideArguments(ExtensionContext extensionContext)
      throws Exception {
    SIPBatchTest executedBatchTest = (SIPBatchTest) extensionContext.getRequiredTestInstance();
    return executedBatchTest.getTestCaseCollector().getTestCases().stream()
        .map(testCase -> arguments(named(testCase.getTestName(), testCase)));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy