本文整理了Java中org.assertj.core.api.AbstractObjectArrayAssert.isEmpty()
方法的一些代码示例,展示了AbstractObjectArrayAssert.isEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractObjectArrayAssert.isEmpty()
方法的具体详情如下:
包路径:org.assertj.core.api.AbstractObjectArrayAssert
类名称:AbstractObjectArrayAssert
方法名:isEmpty
暂无
代码示例来源:origin: twosigma/beakerx
@Test
public void getControlHandlersWithEmptyString_returnEmptyHandlersArray() throws Exception {
//when
Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers("");
//then
Assertions.assertThat(handlers).isEmpty();
}
代码示例来源:origin: twosigma/beakerx
@Test
public void getControlHandlersWithEmptyString_returnEmptyHandlersArray() throws Exception {
//when
Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers("");
//then
Assertions.assertThat(handlers).isEmpty();
}
代码示例来源:origin: twosigma/beakerx
@Test
public void getStringArrayWithNullArrayParam_returnEmptyArray() throws Exception {
//when
String[] value = valueWidget.getStringArray(null);
//then
Assertions.assertThat(value).isEmpty();
}
代码示例来源:origin: twosigma/beakerx
@Test
public void getControlHandlersWithEmptyString_returnEmptyHandlersArray() throws Exception {
//when
Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers("");
//then
Assertions.assertThat(handlers).isEmpty();
}
代码示例来源:origin: twosigma/beakerx
@Test
public void getControlHandlersWithEmptyString_returnEmptyHandlersArray() throws Exception {
//when
Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers("");
//then
Assertions.assertThat(handlers).isEmpty();
}
代码示例来源:origin: twosigma/beakerx
@Test
public void getControlHandlersWithEmptyString_returnEmptyHandlersArray() throws Exception {
//when
Handler<Message>[] handlers = commOpenHandler.getKernelControlChanelHandlers("");
//then
Assertions.assertThat(handlers).isEmpty();
}
代码示例来源:origin: hidroh/materialistic
@Test
public void testGetStoriesEmpty() {
AlgoliaClient.AlgoliaHits hits = new GsonBuilder().create().fromJson("{\"hits\":[]}",
AlgoliaClient.AlgoliaHits.class);
when(TestRestServiceFactory.algoliaRestService.searchByDate(eq("filter")))
.thenReturn(Observable.just(hits));
client.getStories("filter", ItemManager.MODE_DEFAULT, storiesListener);
verify(TestRestServiceFactory.algoliaRestService).searchByDate(eq("filter"));
verify(storiesListener).onResponse(getStoriesResponse.capture());
assertThat(getStoriesResponse.getValue()).isEmpty();
}
代码示例来源:origin: ehcache/ehcache3
@Test
public void fillInStackTrace() {
StorePassThroughException e = new StorePassThroughException(new Exception());
assertThat(e.getStackTrace()).isEmpty();
}
代码示例来源:origin: hidroh/materialistic
@Test
public void testGetAskEmpty() {
when(TestRestServiceFactory.hnRestService.askStoriesRx())
.thenReturn(Observable.just(new int[0]));
client.getStories(ItemManager.ASK_FETCH_MODE, ItemManager.MODE_DEFAULT, storiesListener);
verify(TestRestServiceFactory.hnRestService).askStoriesRx();
verify(storiesListener).onResponse(getStoriesResponse.capture());
assertThat(getStoriesResponse.getValue()).isEmpty();
}
代码示例来源:origin: hidroh/materialistic
@Test
public void testGetKidItems() {
assertThat(item.getKidItems()).isEmpty();
item.populate(new TestItem() {
@Override
public long[] getKids() {
return new long[]{1l, 2l};
}
});
assertThat(item.getKidItems()).hasSize(2);
assertEquals(1, item.getKidItems()[0].getRank());
assertEquals(2, item.getKidItems()[1].getRank());
}
代码示例来源:origin: hidroh/materialistic
@Config(sdk = 21)
@Test
public void testRemoveAccount() {
AccountManager.get(activity).addAccountExplicitly(new Account("existing",
BuildConfig.APPLICATION_ID), "password", null);
Preferences.setUsername(activity, "existing");
drawerAccount.performClick();
AlertDialog alertDialog = ShadowAlertDialog.getLatestAlertDialog();
assertNotNull(alertDialog);
assertThat(alertDialog.getListView().getAdapter()).hasCount(1);
alertDialog.getButton(DialogInterface.BUTTON_NEUTRAL).performClick();
assertThat(alertDialog).isNotShowing();
assertThat(AccountManager.get(activity).getAccounts()).isEmpty();
}
代码示例来源:origin: org.drools/drools-core
@Test
public void injectUnitVariablesNoDataSourceInUnit() {
factory.bindVariable("numberVariable", BigDecimal.ONE);
factory.bindVariable("stringList", Collections.singletonList("test"));
final TestRuleUnit testRuleUnit = new TestRuleUnit(new Integer[]{}, BigDecimal.ZERO);
testRuleUnit.getStringList().add("bla");
final InternalRuleUnitExecutor ruleUnitExecutor = mock(InternalRuleUnitExecutor.class);
factory.injectUnitVariables(ruleUnitExecutor, testRuleUnit);
// Unassigned variables or numbers equal 0 should be reassigned if a variable exists.
assertThat(testRuleUnit.getNumber()).isEqualTo(BigDecimal.ONE);
// Others should remain the same.
assertThat(testRuleUnit.bound).isFalse();
assertThat(testRuleUnit.getNumbersArray()).isNotNull().isEmpty();
assertThat(testRuleUnit.getSimpleFactList()).isNotNull().isEmpty();
assertThat(testRuleUnit.getStringList()).isNotNull().hasSize(1).containsExactly("bla");
verifyZeroInteractions(ruleUnitExecutor);
}
代码示例来源:origin: SonarSource/sonarlint-intellij
@Test
public void testGetters() {
assertThat(colorSettingsPage).isNotNull();
assertThat(colorSettingsPage.getColorDescriptors()).isEmpty();
assertThat(colorSettingsPage.getDisplayName()).isEqualTo("SonarLint");
assertThat(colorSettingsPage.getHighlighter()).isInstanceOf(PlainSyntaxHighlighter.class);
}
代码示例来源:origin: drapostolos/type-parser
@Test
public void canParseToEmpty() throws Exception {
Integer[] intArray = parser.parse("null", Integer[].class);
assertThat(intArray)
.isInstanceOf(Integer[].class)
.isEmpty();
}
代码示例来源:origin: kiegroup/drools-wb
@Test
public void testHandleMetadataAddition() {
final String metadata = "a_b_c";
popup.handleMetadataAddition(metadata);
assertThat(model.attributes).isEmpty();
assertThat(model.metadataList).containsExactly(new RuleMetadata(metadata, ""));
}
代码示例来源:origin: org.drools/drools-wb-guided-rule-editor-client
@Test
public void testHandleAttributeAddition_LockLHS() {
popup.handleAttributeAddition(RuleAttributeWidget.LOCK_LHS);
assertThat(model.attributes).isEmpty();
assertThat(model.metadataList).containsExactly(new RuleMetadata(RuleAttributeWidget.LOCK_LHS, "true"));
verify(refreshCommand).execute();
}
代码示例来源:origin: kiegroup/drools-wb
@Test
public void testHandleAttributeAddition_LockRHS() {
popup.handleAttributeAddition(RuleAttributeWidget.LOCK_RHS);
assertThat(model.attributes).isEmpty();
assertThat(model.metadataList).containsExactly(new RuleMetadata(RuleAttributeWidget.LOCK_RHS, "true"));
verify(refreshCommand).execute();
}
代码示例来源:origin: kiegroup/drools-wb
@Test
public void testHandleAttributeAddition_LockLHS() {
popup.handleAttributeAddition(RuleAttributeWidget.LOCK_LHS);
assertThat(model.attributes).isEmpty();
assertThat(model.metadataList).containsExactly(new RuleMetadata(RuleAttributeWidget.LOCK_LHS, "true"));
verify(refreshCommand).execute();
}
代码示例来源:origin: kiegroup/drools-wb
@Test
public void testHandleAttributeAddition_Timer() {
popup.handleAttributeAddition(RuleAttributeWidget.TIMER_ATTR);
assertThat(model.attributes).containsExactly(new RuleAttribute(RuleAttributeWidget.TIMER_ATTR, ""));
assertThat(model.metadataList).isEmpty();
verify(refreshCommand).execute();
}
代码示例来源:origin: t28hub/json2java4idea
@Test
public void disposeShouldReleaseEditor() throws Exception {
// exercise
application.invokeAndWait(() -> underTest.dispose());
// verify
final Editor[] actual = EditorFactory.getInstance().getAllEditors();
assertThat(actual)
.isEmpty();
}
内容来源于网络,如有侵权,请联系作者删除!