Tabnine Logo
AbstractStringAssert.isNotEmpty
Code IndexAdd Tabnine to your IDE (free)

How to use
isNotEmpty
method
in
org.assertj.core.api.AbstractStringAssert

Best Java code snippets using org.assertj.core.api.AbstractStringAssert.isNotEmpty (Showing top 20 results out of 315)

origin: apache/geode

@Test
public void noIndexPreviouslyDefinedInQueryService() throws Exception {
 when(queryService.createDefinedIndexes()).thenReturn(Collections.emptyList());
 context = new FunctionContextImpl(cache, CreateDefinedIndexesFunction.class.getName(),
   indexDefinitions, resultSender);
 function.execute(context);
 List<?> results = resultSender.getResults();
 assertThat(results).isNotNull();
 assertThat(results.size()).isEqualTo(2);
 Object firstResult = results.get(0);
 assertThat(firstResult).isInstanceOf(CliFunctionResult.class);
 assertThat(((CliFunctionResult) firstResult).isSuccessful()).isTrue();
 assertThat(((CliFunctionResult) firstResult).getMessage()).isNotEmpty();
 assertThat(((CliFunctionResult) firstResult).getMessage()).contains("No indexes defined");
}
origin: apache/geode

@Test
public void noIndexDefinitionsAsFunctionArgument() throws Exception {
 context = new FunctionContextImpl(cache, CreateDefinedIndexesFunction.class.getName(),
   Collections.emptySet(), resultSender);
 function.execute(context);
 List<?> results = resultSender.getResults();
 assertThat(results).isNotNull();
 assertThat(results.size()).isEqualTo(2);
 Object firstResult = results.get(0);
 assertThat(firstResult).isInstanceOf(CliFunctionResult.class);
 assertThat(((CliFunctionResult) firstResult).isSuccessful()).isTrue();
 assertThat(((CliFunctionResult) firstResult).getMessage()).isNotEmpty();
 assertThat(((CliFunctionResult) firstResult).getMessage()).contains("No indexes defined");
}
origin: spring-projects/spring-security

@Test
public void findByUsernameWhenClearCredentialsThenFindByUsernameStillHasCredentials() {
  User foundUser = users.findByUsername(USER_DETAILS.getUsername()).cast(User.class).block();
  assertThat(foundUser.getPassword()).isNotEmpty();
  foundUser.eraseCredentials();
  assertThat(foundUser.getPassword()).isNull();
  foundUser = users.findByUsername(USER_DETAILS.getUsername()).cast(User.class).block();
  assertThat(foundUser.getPassword()).isNotEmpty();
}
origin: apache/geode

@Test
public void infoResultDataStructure() {
 InfoResultData result = ResultBuilder.createInfoResultData();
 result.addLine("line 1");
 result.addLine("line 2");
 result.setHeader("Heads");
 result.setFooter("Tails");
 CommandResult cmdResult = ResultBuilder.buildResult(result);
 assertThat(cmdResult.getHeader()).isEqualTo("Heads");
 assertThat(cmdResult.getListFromContent("message")).contains("line 1", "line 2");
 assertThat(cmdResult.getFooter()).isEqualTo("Tails");
 assertThat(cmdResult.getValueFromContent("message")).isNotEmpty();
 assertThat(cmdResult.getStatus()).isEqualTo(Result.Status.OK);
}
origin: apache/geode

@Test
public void errorResultDataStructure() {
 ErrorResultData result = ResultBuilder.createErrorResultData();
 result.addLine("line 1");
 result.addLine("line 2");
 result.setHeader("Heads");
 result.setFooter("Tails");
 CommandResult cmdResult = ResultBuilder.buildResult(result);
 assertThat(cmdResult.getHeader()).isEqualTo("Heads");
 assertThat(cmdResult.getListFromContent("message")).contains("line 1", "line 2");
 assertThat(cmdResult.getFooter()).isEqualTo("Tails");
 assertThat(cmdResult.getValueFromContent("message")).isNotEmpty();
 assertThat(cmdResult.getStatus()).isEqualTo(Result.Status.ERROR);
}
origin: palantir/atlasdb

@Override
public void tearDown() throws Exception {
  try {
    Optional<Span> finishedSpan = Tracer.completeSpan();
    SpanObserver observer = Tracer.unsubscribe(TEST_OBSERVER_NAME);
    assertThat(observer).isInstanceOf(TestSpanObserver.class);
    List<Span> spans = ((TestSpanObserver) observer).spans();
    log.warn("{} spans: {}", spans.size(), spans.stream().map(Span::getOperation).collect(Collectors.toList()));
    if (Tracer.isTraceObservable()) {
      assertThat(finishedSpan.isPresent()).isTrue();
      assertThat(finishedSpan.get().getOperation()).isEqualTo("test");
      String traceId = finishedSpan.get().getTraceId();
      assertThat(traceId).isNotNull();
      assertThat(traceId).isNotEmpty();
      assertThat(spans).isNotEmpty();
      assertThat(spans.size())
          .describedAs("Should include root test span and additional KVS method spans %s", spans)
          .isGreaterThanOrEqualTo(1);
      assertThat(spans.stream()
          .filter(span -> !Objects.equals(traceId, span.getTraceId()))
          .map(Span::getTraceId)
          .collect(Collectors.toSet()))
          .describedAs("All spans should have same trace ID %s, spans %s", traceId, spans)
          .isEmpty();
    }
  } finally {
    super.tearDown();
  }
}
origin: org.activiti.cloud.common/activiti-cloud-services-test

public AssertFileContent isFile() {
  assertThat(response).isNotNull();
  assertThat(response.getContentType()).isNotNull();
  assertThat(response.getContentAsByteArray()).isNotEmpty();
  assertThat(response.getHeader(CONTENT_DISPOSITION))
      .isNotEmpty()
      .startsWith(ATTACHMENT_CONTENT_DISPOSITION);
  String filename = response.getHeader(CONTENT_DISPOSITION)
      .substring(ATTACHMENT_CONTENT_DISPOSITION.length());
  return new AssertFileContent(new FileContent(filename,
                         response.getContentType(),
                         response.getContentAsByteArray()));
}
origin: RoboZonky/robozonky

  @Test
  void responseContent() {
    final Collection<NameValuePair> nvp = Collections.singletonList(new BasicNameValuePair("key", "value"));
    final HttpEntity e = new UrlEncodedFormEntity(nvp);
    assertThat(Util.readEntity(e)).isNotEmpty();
  }
}
origin: yggdrash/yggdrash

@Test
public void sendTransactionTest() {
  String res = txApiImpl.sendTransaction(TransactionDto.createBy(tx));
  assertThat(res).isNotEmpty();
}
origin: RoboZonky/robozonky

@ParameterizedTest
@MethodSource("describe")
void describe(final AbstractFeature feature) {
  assertThat(feature.describe()).isNotEmpty();
}
origin: RoboZonky/robozonky

@Test
void hasRichCode() {
  for (final Region r: Region.values()) {
    assertThat(r.getRichCode()).isNotEmpty();
  }
}
origin: RoboZonky/robozonky

private static <T extends Event> void testFormal(final AbstractListener<T> listener, final T event,
                         final SupportedListener listenerType) {
  assertThat(event).isInstanceOf(listenerType.getEventType());
  assertThat(listener.getTemplateFileName())
      .isNotNull()
      .isNotEmpty();
}
origin: yggdrash/yggdrash

@Test
public void sendTransactionTest() {
  TransactionHusk tx = createTx();
  // Request Transaction with jsonStr
  try {
    assertThat(TX_API.sendTransaction(TransactionDto.createBy(tx))).isNotEmpty();
  } catch (Exception exception) {
    log.debug("\n\nsendTransactionTest :: exception => " + exception);
  }
}
origin: line/centraldogma

  @Test
  public void testToString() {
    assertThat(Entry.ofText(new Revision(1), "/a.txt", "a").toString()).isNotEmpty();
  }
}
origin: yggdrash/yggdrash

@Test
public void initTest() {
  assertThat(stateValue.getType()).isNull();
  assertThat(stateValue.getTag()).isNull();
  assertThat(stateValue.getContractHistory()).isEmpty();
  stateValue.init();
  assertThat(stateValue.getType()).isEqualTo(Branch.BranchType.TEST);
  assertThat(stateValue.getTag()).isNotEmpty();
  assertThat(stateValue.getContractHistory()).contains(stateValue.getContractId());
}
origin: mokies/ratelimitj

@Test
@DisplayName("should cache loaded sha")
void shouldCache() {
  RedisScriptLoader scriptLoader = new RedisScriptLoader(extension.getScriptingReactiveCommands(), "hello-world.lua");
  assertThat(scriptLoader.storedScript().block(Duration.ofSeconds(5)).getSha()).isNotEmpty();
  scriptFlush();
  assertThat(scriptLoader.storedScript().block(Duration.ofSeconds(5)).getSha()).isNotEmpty();
}
origin: io.syndesis.connector/connector-support-util

@Test
public void testStore() throws Exception {
  final KeyStoreHelper helper = new KeyStoreHelper(CertificateUtilTest.TEST_CERT, "test-cert");
  helper.store();
  assertThat(helper.getKeyStorePath()).isNotEmpty();
  assertThat(helper.getPassword()).isNotEmpty();
}
origin: io.syndesis.server/server-inspector

  @Test
  public void shouldFetchFromStaticResource() throws Exception {
    final String json = new StaticResourceClassInspector(new DefaultResourceLoader()).fetchJsonFor("twitter4j.Status", null);

    assertThat(json).isNotEmpty();
  }
}
origin: mokies/ratelimitj

@Test
@DisplayName("should load rate limit lua script into Redis")
void shouldLoadScript() {
  RedisScriptLoader scriptLoader = new RedisScriptLoader(extension.getScriptingReactiveCommands(), "hello-world.lua");
  scriptFlush();
  String sha = scriptLoader.storedScript().block(Duration.ofSeconds(5)).getSha();
  assertThat(sha).isNotEmpty();
  assertThat(extension.getScriptingReactiveCommands().scriptExists(sha).blockFirst()).isTrue();
}
origin: mokies/ratelimitj

@Test
@DisplayName("should eagerly load rate limit lua script into Redis")
void shouldEagerlyLoadScript() {
  RedisScriptLoader scriptLoader = new RedisScriptLoader(extension.getScriptingReactiveCommands(), "hello-world.lua", true);
  String sha = scriptLoader.storedScript().block(Duration.ofSeconds(5)).getSha();
  assertThat(sha).isNotEmpty();
  scriptFlush();
  new RedisScriptLoader(extension.getScriptingReactiveCommands(), "hello-world.lua", true);
  assertThat(extension.getScriptingReactiveCommands().scriptExists(sha).blockFirst()).isTrue();
}
org.assertj.core.apiAbstractStringAssertisNotEmpty

Popular methods of AbstractStringAssert

  • isEqualTo
  • contains
  • isNull
  • isNotNull
  • startsWith
  • isEmpty
  • isNotEqualTo
  • doesNotContain
  • as
  • matches
  • endsWith
  • isEqualToIgnoringCase
  • endsWith,
  • isEqualToIgnoringCase,
  • containsPattern,
  • isSameAs,
  • isEqualToIgnoringWhitespace,
  • isIn,
  • isNotBlank,
  • describedAs,
  • isEqualToNormalizingNewlines

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Permission (java.security)
    Legacy security code; do not use.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ImageIO (javax.imageio)
  • JButton (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now