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

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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