类org.junit.jupiter.api.condition.EnabledIfSystemProperty源码实例Demo

下面列出了怎么用org.junit.jupiter.api.condition.EnabledIfSystemProperty的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: camel-quarkus   文件: DebeziumSqlserverTest.java
@Test
@Order(0)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testReceiveInitCompany() {
    //receive first record (operation r) for the init company - using larger timeout
    Response response = receiveResponse("/receiveAsRecord");

    response.then()
            .statusCode(200);

    Record record = response.getBody().as(Record.class);
    Assert.assertEquals("r", record.getOperation());
    Assert.assertEquals("Struct{NAME=init,CITY=init}", record.getValue());
}
 
源代码2 项目: camel-quarkus   文件: DebeziumMysqlTest.java
@Test
@Order(0)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testReceiveEmptyMessages() {
    //receive all empty messages before other tests
    receiveResponse("/receiveEmptyMessages")
            .then()
            .statusCode(204);
}
 
源代码3 项目: spring-cloud-dataflow   文件: DataFlowIT.java
@Test
@EnabledIfSystemProperty(named = "PLATFORM_TYPE", matches = "cloudfoundry")
@DisabledIfSystemProperty(named = "SKIP_CLOUD_CONFIG", matches = "true")
public void streamWithConfigServer() {

	logger.info("stream-server-config-test");

	try (Stream stream = Stream.builder(dataFlowOperations)
			.name("TICKTOCK-config-server")
			.definition("time | log")
			.create()
			.deploy(new DeploymentPropertiesBuilder()
					.putAll(testDeploymentProperties())
					.put("app.log.spring.profiles.active", "test")
					.put("deployer.log.cloudfoundry.services", "cloud-config-server")
					.put("app.log.spring.cloud.config.name", "MY_CONFIG_TICKTOCK_LOG_NAME")
					.build())) {

		Awaitility.await(stream.getName() + " failed to deploy!")
				.until(() -> stream.getStatus().equals(DEPLOYED));

		Awaitility.await().await("Source not started")
				.until(() -> runtimeApps.getFirstInstanceLog(stream, "time")
						.contains("Started TimeSource"));
		Awaitility.await().await("Sink not started")
				.until(() -> runtimeApps.getFirstInstanceLog(stream, "log")
						.contains("Started LogSink"));
		Awaitility.await().await("No output found")
				.until(() -> runtimeApps.getFirstInstanceLog(stream, "log")
						.contains("TICKTOCK CLOUD CONFIG - TIMESTAMP:"));
	}
}
 
源代码4 项目: camel-quarkus   文件: DebeziumSqlserverTest.java
@Test
@Order(1)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testInsert() throws SQLException {
    super.testInsert();
}
 
源代码5 项目: camel-quarkus   文件: DebeziumSqlserverTest.java
@Test
@Order(2)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testUpdate() throws SQLException {
    super.testUpdate();
}
 
源代码6 项目: camel-quarkus   文件: DebeziumSqlserverTest.java
@Test
@Order(3)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testDelete() throws SQLException {
    super.testDelete();
}
 
源代码7 项目: camel-quarkus   文件: DebeziumMysqlTest.java
@Test
@Order(1)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testInsert() throws SQLException {
    super.testInsert();
}
 
源代码8 项目: camel-quarkus   文件: DebeziumMysqlTest.java
@Test
@Order(2)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testUpdate() throws SQLException {
    super.testUpdate();
}
 
源代码9 项目: camel-quarkus   文件: DebeziumMysqlTest.java
@Test
@Order(3)
@EnabledIfSystemProperty(named = PROPERTY_JDBC, matches = ".*")
public void testDelete() throws SQLException {
    super.testDelete();
}
 
@Test
@EnabledIfSystemProperty(named = "os.arch", matches = ".*64.*")
void onlyOn64BitArchitectures() {
    // ...
}
 
源代码11 项目: canon-sdk-java   文件: DllTest.java
@Test
@EnabledIfSystemProperty(named = "os.arch", matches = ".*32.*")
void loadLib32() {
    // throws on java 64 bit (win32-x86-64/EDSDK\Dll\EDSDK.dll), not tested with 32 bit runtime
    loadLibraryBasics(DEFAULT_LIB_32_PATH);
}
 
源代码12 项目: canon-sdk-java   文件: DllTest.java
@Test
@EnabledIfSystemProperty(named = "os.arch", matches = ".*64.*")
void loadLib64() {
    // might throw on 32 bit, not tested
    loadLibraryBasics(DEFAULT_LIB_64_PATH);
}
 
源代码13 项目: journaldev   文件: DisabledTests.java
@Test
// My System Properties "user.name" value is "pankaj"
@EnabledIfSystemProperty(named = "user.name", matches = "pankaj")
void test9() {
	assertTrue("pankaj".equals(System.getProperty("user.name")));
}
 
源代码14 项目: armeria   文件: ClientFactoryBuilderTest.java
@Test
@EnabledIfSystemProperty(named = "com.linecorp.armeria.useJdkDnsResolver", matches = "true")
void useDefaultAddressResolverGroup() {
    final DefaultClientFactory clientFactory = (DefaultClientFactory) ClientFactory.ofDefault();
    assertThat(clientFactory.addressResolverGroup()).isSameAs(DefaultAddressResolverGroup.INSTANCE);
}
 
 类所在包
 同包方法