本文整理了Java中org.assertj.core.api.AbstractStringAssert.isNullOrEmpty()
方法的一些代码示例,展示了AbstractStringAssert.isNullOrEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractStringAssert.isNullOrEmpty()
方法的具体详情如下:
包路径:org.assertj.core.api.AbstractStringAssert
类名称:AbstractStringAssert
方法名:isNullOrEmpty
暂无
代码示例来源:origin: reactor/reactor-core
@Test
public void fluxInitialValueAvailableOnceIfBroadcasted() {
// "A deferred Flux with an initial value makes that value available once if broadcasted"
// given: "a composable with an initial value"
Flux<String> stream = Flux.just("test")
.publish()
.autoConnect();
// when: "the value is retrieved"
AtomicReference<String> value = new AtomicReference<>();
AtomicReference<String> value2 = new AtomicReference<>();
stream.subscribe(value::set);
stream.subscribe(value2::set);
// then: "it is available in value 1 but value 2 has subscribed after dispatching"
assertThat(value.get()).isEqualTo("test");
assertThat(value2.get()).isNullOrEmpty();
}
代码示例来源:origin: SpectoLabs/hoverfly-java
@Test
public void shouldNotSetSystemPropertiesWhenHoverflyInWebServerMode() {
System.clearProperty("http.proxyHost");
System.clearProperty("https.proxyHost");
hoverfly = new Hoverfly(localConfigs().asWebServer(), SIMULATE);
hoverfly.start();
assertThat(System.getProperty("http.proxyHost")).isNullOrEmpty();
assertThat(System.getProperty("https.proxyHost")).isNullOrEmpty();
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void createServiceInstanceBindingFails() {
prepareBindingFlows();
StepVerifier
.create(serviceInstanceBindingEventService.createServiceInstanceBinding(
CreateServiceInstanceBindingRequest.builder()
.serviceInstanceId("foo")
.build()))
.expectError()
.verify();
assertThat(this.results.getBeforeCreate()).isEqualTo("before create foo");
assertThat(this.results.getAfterCreate()).isNullOrEmpty();
assertThat(this.results.getErrorCreate()).isEqualTo("error create foo");
assertThat(this.results.getBeforeDelete()).isNullOrEmpty();
assertThat(this.results.getAfterDelete()).isNullOrEmpty();
assertThat(this.results.getErrorDelete()).isNullOrEmpty();
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void deleteServiceInstanceBindingFails() {
prepareBindingFlows();
StepVerifier
.create(serviceInstanceBindingEventService.deleteServiceInstanceBinding(
DeleteServiceInstanceBindingRequest.builder()
.serviceInstanceId("foo")
.build()))
.expectError()
.verify();
assertThat(this.results.getBeforeCreate()).isNullOrEmpty();
assertThat(this.results.getAfterCreate()).isNullOrEmpty();
assertThat(this.results.getErrorCreate()).isNullOrEmpty();
assertThat(this.results.getBeforeDelete()).isEqualTo("before delete foo");
assertThat(this.results.getAfterDelete()).isNullOrEmpty();
assertThat(this.results.getErrorDelete()).isEqualTo("error delete foo");
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void createServiceInstanceBindingSucceeds() {
prepareBindingFlows();
StepVerifier
.create(serviceInstanceBindingEventService.createServiceInstanceBinding(
CreateServiceInstanceBindingRequest.builder()
.serviceInstanceId("foo")
.serviceDefinitionId("bar")
.build()))
.expectNext(CreateServiceInstanceAppBindingResponse.builder().build())
.verifyComplete();
assertThat(this.results.getBeforeCreate()).isEqualTo("before create foo");
assertThat(this.results.getAfterCreate()).isEqualTo("after create foo");
assertThat(this.results.getErrorCreate()).isNullOrEmpty();
assertThat(this.results.getBeforeDelete()).isNullOrEmpty();
assertThat(this.results.getAfterDelete()).isNullOrEmpty();
assertThat(this.results.getErrorDelete()).isNullOrEmpty();
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void deleteServiceInstanceBindingSucceeds() {
prepareBindingFlows();
StepVerifier
.create(serviceInstanceBindingEventService.deleteServiceInstanceBinding(
DeleteServiceInstanceBindingRequest.builder()
.serviceInstanceId("foo")
.bindingId("bar")
.build()))
.expectNext(DeleteServiceInstanceBindingResponse.builder().build())
.verifyComplete();
assertThat(this.results.getBeforeCreate()).isNullOrEmpty();
assertThat(this.results.getAfterCreate()).isNullOrEmpty();
assertThat(this.results.getErrorCreate()).isNullOrEmpty();
assertThat(this.results.getBeforeDelete()).isEqualTo("before delete foo");
assertThat(this.results.getAfterDelete()).isEqualTo("after delete foo");
assertThat(this.results.getErrorDelete()).isNullOrEmpty();
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void getLastOperationFails() {
prepareLastOperationEventFlows();
StepVerifier
.create(serviceInstanceEventService.getLastOperation(GetLastServiceOperationRequest.builder()
.serviceInstanceId("foo")
.build()))
.expectError()
.verify();
assertThat(this.results.getBeforeLastOperation()).isEqualTo("before foo");
assertThat(this.results.getAfterLastOperation()).isNullOrEmpty();
assertThat(this.results.getErrorLastOperation()).isEqualTo("error foo");
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void createServiceInstanceFails() {
prepareCreateEventFlows();
StepVerifier.create(serviceInstanceEventService.createServiceInstance(
CreateServiceInstanceRequest.builder()
.serviceInstanceId("foo")
.build()))
.expectError()
.verify();
assertThat(this.results.getBeforeCreate()).isEqualTo("before foo");
assertThat(this.results.getAfterCreate()).isNullOrEmpty();
assertThat(this.results.getErrorCreate()).isEqualTo("error foo");
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void updateServiceInstanceFails() {
prepareUpdateEventFlows();
StepVerifier
.create(serviceInstanceEventService.updateServiceInstance(
UpdateServiceInstanceRequest.builder()
.serviceInstanceId("foo")
.build()))
.expectError()
.verify();
assertThat(this.results.getBeforeUpdate()).isEqualTo("before foo");
assertThat(this.results.getAfterUpdate()).isNullOrEmpty();
assertThat(this.results.getErrorUpdate()).isEqualTo("error foo");
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void deleteServiceInstanceFails() {
prepareDeleteEventFlows();
StepVerifier
.create(serviceInstanceEventService.deleteServiceInstance(
DeleteServiceInstanceRequest.builder()
.serviceInstanceId("foo")
.build()))
.expectError()
.verify();
assertThat(this.results.getBeforeDelete()).isEqualTo("before foo");
assertThat(this.results.getAfterDelete()).isNullOrEmpty();
assertThat(this.results.getErrorDelete()).isEqualTo("error foo");
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void updateServiceInstanceSucceeds() {
prepareUpdateEventFlows();
StepVerifier
.create(serviceInstanceEventService.updateServiceInstance(
UpdateServiceInstanceRequest.builder()
.serviceInstanceId("foo")
.serviceDefinitionId("bar")
.build()))
.expectNext(UpdateServiceInstanceResponse.builder().build())
.verifyComplete();
assertThat(this.results.getBeforeUpdate()).isEqualTo("before foo");
assertThat(this.results.getAfterUpdate()).isEqualTo("after foo");
assertThat(this.results.getErrorUpdate()).isNullOrEmpty();
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void getLastOperationSucceeds() {
prepareLastOperationEventFlows();
StepVerifier
.create(serviceInstanceEventService.getLastOperation(GetLastServiceOperationRequest.builder()
.serviceInstanceId("foo")
.serviceDefinitionId("bar")
.build()))
.expectNext(GetLastServiceOperationResponse.builder().build())
.verifyComplete();
assertThat(this.results.getBeforeLastOperation()).isEqualTo("before foo");
assertThat(this.results.getAfterLastOperation()).isEqualTo("after foo");
assertThat(this.results.getErrorLastOperation()).isNullOrEmpty();
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void createServiceInstanceSucceeds() {
prepareCreateEventFlows();
StepVerifier
.create(serviceInstanceEventService.createServiceInstance(
CreateServiceInstanceRequest.builder()
.serviceInstanceId("foo")
.serviceDefinitionId("bar")
.build()))
.expectNext(CreateServiceInstanceResponse.builder().build())
.verifyComplete();
assertThat(this.results.getBeforeCreate()).isEqualTo("before foo");
assertThat(this.results.getAfterCreate()).isEqualTo("after foo");
assertThat(this.results.getErrorCreate()).isNullOrEmpty();
}
代码示例来源:origin: spring-cloud/spring-cloud-open-service-broker
@Test
public void deleteServiceInstanceSucceeds() {
prepareDeleteEventFlows();
StepVerifier
.create(serviceInstanceEventService.deleteServiceInstance(
DeleteServiceInstanceRequest.builder()
.serviceInstanceId("foo")
.serviceDefinitionId("bar")
.build()))
.expectNext(DeleteServiceInstanceResponse.builder().build())
.verifyComplete();
assertThat(this.results.getBeforeDelete()).isEqualTo("before foo");
assertThat(this.results.getAfterDelete()).isEqualTo("after foo");
assertThat(this.results.getErrorDelete()).isNullOrEmpty();
}
内容来源于网络,如有侵权,请联系作者删除!