org.assertj.core.api.AbstractByteArrayAssert.isEmpty()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(15)

本文整理了Java中org.assertj.core.api.AbstractByteArrayAssert.isEmpty()方法的一些代码示例,展示了AbstractByteArrayAssert.isEmpty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractByteArrayAssert.isEmpty()方法的具体详情如下:
包路径:org.assertj.core.api.AbstractByteArrayAssert
类名称:AbstractByteArrayAssert
方法名:isEmpty

AbstractByteArrayAssert.isEmpty介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-security

@Test
public void decodingCharsOutsideAsciiGivesNoResults() {
  byte[] ba = BCrypt.decode_base64("ππππππππ", 1);
  assertThat(ba).isEmpty();
}

代码示例来源:origin: spring-projects/spring-security

@Test
public void decodeEmptyString() {
  assertThat(Hex.decode("")).isEmpty();
}

代码示例来源:origin: spring-projects/spring-security

@Test
public void decodingStopsWithFirstInvalidCharacter() {
  assertThat(BCrypt.decode_base64("....", 1)).hasSize(1);
  assertThat(BCrypt.decode_base64(" ....", 1)).isEmpty();
}

代码示例来源:origin: spring-projects/spring-security

@Test
public void decodingOnlyProvidesAvailableBytes() {
  assertThat(BCrypt.decode_base64("", 1)).isEmpty();
  assertThat(BCrypt.decode_base64("......", 3)).hasSize(3);
  assertThat(BCrypt.decode_base64("......", 4)).hasSize(4);
  assertThat(BCrypt.decode_base64("......", 5)).hasSize(4);
}

代码示例来源:origin: palantir/atlasdb

private void assertReadAtTimestampReturnsTombstoneAtTimestamp(TableReference tableRef, long readTs, long tombTs) {
  Value readValue = Iterables.getOnlyElement(readFromDefaultCell(tableRef, readTs).values());
  assertThat(readValue.getTimestamp()).isEqualTo(tombTs);
  assertThat(readValue.getContents()).isEmpty();
}

代码示例来源:origin: palantir/atlasdb

@Test
public void tablesWithDifferentCapitalizationClaimToHaveMetadata() {
  kvs.createTable(UPPER_UPPER, AtlasDbConstants.GENERIC_TABLE_METADATA);
  kvs.createTable(LOWER_UPPER, AtlasDbConstants.GENERIC_TABLE_METADATA);
  TABLES.forEach(table -> assertThat(kvs.getMetadataForTable(table)).isNotEmpty());
  assertThat(kvs.getMetadataForTable(TableReference.createFromFullyQualifiedName("other.table"))).isEmpty();
}

代码示例来源:origin: palantir/atlasdb

@Test
public void droppedTableHasNoObservableMetadata() {
  kvs.createTable(LOWER_UPPER, AtlasDbConstants.GENERIC_TABLE_METADATA);
  kvs.dropTable(LOWER_UPPER);
  assertThat(kvs.getMetadataForTables()).isEmpty();
  assertThat(kvs.getMetadataForTable(LOWER_UPPER)).isEmpty();
}

代码示例来源:origin: palantir/atlasdb

@Test
public void droppingTablesCleansUpLegacyMetadataAndDoesNotAffectOtherTables() {
  TableReference longerInRange = TableReference.createFromFullyQualifiedName("test.TABLEs");
  TableReference shorterInRange = TableReference.createFromFullyQualifiedName("test.TABL");
  kvs.createTable(LOWER_UPPER, AtlasDbConstants.GENERIC_TABLE_METADATA);
  kvs.createTable(longerInRange, AtlasDbConstants.GENERIC_TABLE_METADATA);
  kvs.createTable(shorterInRange, AtlasDbConstants.GENERIC_TABLE_METADATA);
  clearOutMetadataTable(kvs);
  insertMetadataIntoNewCell(LOWER_UPPER);
  insertGenericMetadataIntoLegacyCell(kvs, LOWER_UPPER);
  insertGenericMetadataIntoLegacyCell(kvs, UPPER_UPPER);
  insertGenericMetadataIntoLegacyCell(kvs, longerInRange);
  insertGenericMetadataIntoLegacyCell(kvs, shorterInRange);
  kvs.dropTable(LOWER_UPPER);
  assertThat(kvs.getMetadataForTables().keySet()).containsExactlyInAnyOrder(longerInRange, shorterInRange);
  assertThat(kvs.getMetadataForTable(LOWER_UPPER)).isEmpty();
}

代码示例来源:origin: aafomin/gerbera

@Test
public void testDecodeEmpty() {
  byte[] decoded = Base58CheckUtils.decode("3QJmnh");
  assertThat(decoded).isEmpty();
}

代码示例来源:origin: aafomin/gerbera

@Test
public void testBytesEmpty() {
  byte[] bytes = HexUtils.asBytes("");
  assertThat(bytes).isEmpty();
}

代码示例来源:origin: PegaSysEng/pantheon

@Test
public void shouldDecompressEmptyMessage() {
 final byte[] compressed = snappy.compress(new byte[0]);
 assertThat(snappy.decompress(compressed)).isEmpty();
}

代码示例来源:origin: aafomin/gerbera

@Test
public void testEmpty() {
  ByteBuffer buffer = new ByteBuffer();
  assertThat(buffer.size()).isZero();
  assertThat(buffer.bytes()).isEmpty();
  assertThat(buffer.bytesReversed()).isEmpty();
}

代码示例来源:origin: line/line-bot-sdk-java

@Test
public void parseBytesOrNullTestForEmpty() throws Exception {
  // Do
  byte[] bytes = BeaconContentUtil.parseBytesOrNull("");
  // Verify
  assertThat(bytes).isNotNull().isEmpty();
}

代码示例来源:origin: line/centraldogma

null, null, USERNAME, PUBLIC_KEY, PRIVATE_KEY, "").passphrase()).isEmpty();

相关文章