本文整理了Java中org.assertj.core.api.AbstractStringAssert.doesNotContain()
方法的一些代码示例,展示了AbstractStringAssert.doesNotContain()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractStringAssert.doesNotContain()
方法的具体详情如下:
包路径:org.assertj.core.api.AbstractStringAssert
类名称:AbstractStringAssert
方法名:doesNotContain
暂无
代码示例来源:origin: apache/geode
/**
* Verifies the gfsh output does not contain the given output
*/
public CommandResultAssert doesNotContainOutput(String... expectedOutputs) {
for (String expectedOutput : expectedOutputs) {
assertThat(actual.getOutput()).doesNotContain(expectedOutput);
}
return this;
}
代码示例来源:origin: apache/geode
@Test
public void testShowLogDefault() {
writeLogMessages();
String command = "show log --member=" + MANAGER_NAME;
gfsh.executeAndAssertThat(command).statusIsSuccess();
assertThat(gfsh.getGfshOutput()).contains(MESSAGE_ON_MANAGER);
assertThat(gfsh.getGfshOutput()).doesNotContain(MESSAGE_ON_SERVER1);
assertThat(gfsh.getGfshOutput()).doesNotContain(MESSAGE_ON_SERVER2);
}
代码示例来源:origin: apache/geode
@Test
public void testGCForEntireCluster() {
String command = "gc";
gfsh.executeAndAssertThat(command).statusIsSuccess();
String output = gfsh.getGfshOutput();
assertThat(output).contains(SERVER1_NAME);
assertThat(output).contains(SERVER2_NAME);
assertThat(output).doesNotContain(MANAGER_NAME);
}
代码示例来源:origin: reactor/reactor-core
@Test
public void traceDismissedInNonVerboseMode() {
Logger log = new Loggers.ConsoleLogger("test", new PrintStream(outContent), new PrintStream(errContent), false);
log.trace("foo");
log.trace("foo", new IllegalArgumentException("foo"));
log.trace("foo {}", "foo");
assertThat(outContent.toString()).doesNotContain("foo");
assertThat(errContent.toString()).doesNotContain("foo");
assertThat(log.isTraceEnabled()).as("isTraceEnabled").isFalse();
}
代码示例来源:origin: reactor/reactor-core
@Test
public void debugDismissedInNonVerboseMode() {
Logger log = new Loggers.ConsoleLogger("test", new PrintStream(outContent), new PrintStream(errContent), false);
log.debug("foo");
log.debug("foo", new IllegalArgumentException("foo"));
log.debug("foo {}", "foo");
assertThat(outContent.toString()).doesNotContain("foo");
assertThat(errContent.toString()).doesNotContain("foo");
assertThat(log.isDebugEnabled()).as("isDebugEnabled").isFalse();
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainUptimeWhenStarting() {
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_UPTIME);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainGeodeVersionWhenStarting() {
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_GEODE_VERSION);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainLineSeparatorsWhenStopped() {
launcher.setStatus(STOPPED);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(System.lineSeparator());
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainLineSeparatorsWhenNotResponding() {
launcher.setStatus(NOT_RESPONDING);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(System.lineSeparator());
}
代码示例来源:origin: spring-io/initializr
@Test
void doNotForceSslByDefault() {
ResponseEntity<String> response = invokeHome("curl/1.2.4", "*/*");
String body = response.getBody();
assertThat(body).as("Must not force https").contains("http://start.spring.io/");
assertThat(body).as("Must not force https").doesNotContain("https://");
}
代码示例来源:origin: apache/geode
@Test
public void describeDataSourceWithPoolPropertiesDoesNotShowsItInTheResult() {
binding.setType(DATASOURCE_TYPE.SIMPLE.getType());
List<ConfigProperty> configProperties = binding.getConfigProperties();
configProperties.add(new ConfigProperty("name1", "value1"));
ResultModel result = command.describeDataSource(DATA_SOURCE_NAME);
assertThat(result.toString()).doesNotContain("name1");
assertThat(result.toString()).doesNotContain("value1");
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainJavaVersionWhenStopped() {
launcher.setStatus(STOPPED);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_PROCESS_ID);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainJvmArgumentsWhenNotResponding() {
launcher.setStatus(NOT_RESPONDING);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_JVM_ARGUMENTS);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainProcessIdWhenNotResponding() {
launcher.setStatus(NOT_RESPONDING);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_PROCESS_ID);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainJavaVersionWhenNotResponding() {
launcher.setStatus(NOT_RESPONDING);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_PROCESS_ID);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainUptimeWhenStopped() {
launcher.setStatus(STOPPED);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_UPTIME);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainProcessIdWhenStopped() {
launcher.setStatus(STOPPED);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_PROCESS_ID);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainJvmArgumentsWhenStopped() {
launcher.setStatus(STOPPED);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_JVM_ARGUMENTS);
}
代码示例来源:origin: apache/geode
@Test
public void toStringDoesNotContainLogFileWhenStopped() {
launcher.setStatus(STOPPED);
TestLauncher.TestState status = launcher.status();
String result = status.toString();
assertThat(result).doesNotContain(TO_STRING_PROCESS_ID);
}
代码示例来源:origin: apache/geode
@Test
public void listDataSourceWithUnsupportedTypeIgnoresIt() {
binding.setType(DATASOURCE_TYPE.MANAGED.getType());
ResultModel result = command.listDataSources();
assertThat(result.getStatus()).isEqualTo(Status.OK);
assertThat(result.toString()).doesNotContain(DATA_SOURCE_NAME);
}
内容来源于网络,如有侵权,请联系作者删除!