org.jgroups.util.Util.assertEquals()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(248)

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

Util.assertEquals介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

public static void assertEquals(Object val1,Object val2) {
  assertEquals(null,val1,val2);
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-core-api

@Test
public void testWhenSecondParamIsNull() {
  assertEquals(1, safeComparator.compare(param1, null));
  verify(comparator, never()).compare(any(), any());
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-core-api

@Test
public void testWhenBothParamsAreNull() {
  assertEquals(0, safeComparator.compare(null, null));
  verify(comparator, never()).compare(any(), any());
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-core-api

@Test
public void testWhenBothParamsAreNotNull() {
  int expectedResult = 1234;
  when(comparator.compare(param1, param2)).thenReturn(expectedResult);
  assertEquals(expectedResult, safeComparator.compare(param1, param2));
  verify(comparator).compare(param1, param2);
}

代码示例来源:origin: org.uberfire/uberfire-preferences-api

@Test
public void textTypeTest() {
  String someText = "someText";
  String stringValue = PropertyFormType.TEXT.toString(someText);
  Object realValue = PropertyFormType.TEXT.fromString(stringValue);
  assertEquals("someText",
         stringValue);
  assertEquals(someText,
         realValue);
}

代码示例来源:origin: org.uberfire/uberfire-preferences-api

@Test
public void booleanTypeTest() {
  boolean someBoolean = true;
  String stringValue = PropertyFormType.BOOLEAN.toString(someBoolean);
  Object realValue = PropertyFormType.BOOLEAN.fromString(stringValue);
  assertEquals("true",
         stringValue);
  assertEquals(someBoolean,
         realValue);
}

代码示例来源:origin: org.uberfire/uberfire-preferences-api

@Test
public void naturalNumberTypeTest() {
  int someNaturalNumber = 3;
  String stringValue = PropertyFormType.NATURAL_NUMBER.toString(someNaturalNumber);
  Object realValue = PropertyFormType.NATURAL_NUMBER.fromString(stringValue);
  assertEquals("3",
         stringValue);
  assertEquals(someNaturalNumber,
         realValue);
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
  public void getPartsShouldReturnCurrentWidgets() {
    partManager = new PartManager();

    partManager.registerPart(mock(PartDefinition.class),
                 mock(Widget.class));
    partManager.registerPart(mock(PartDefinition.class),
                 mock(Widget.class));

    assertEquals(2,
           partManager.getParts().size());
  }
}

代码示例来源:origin: org.uberfire/uberfire-m2repo-editor-backend

@Test
  public void testPomRepositories() {
    List<? extends ArtifactRepository> repositories = this.artifactRepositoryService.getPomRepositories();
    assertEquals(2,
           repositories.size());
    assertTrue(Arrays.asList(this.artifactRepository1,
                 this.artifactRepository2).containsAll(repositories));
    assertFalse(repositories.contains(this.artifactRepository3));
    assertFalse(repositories.contains(this.artifactRepository4));
    assertFalse(repositories.contains(this.artifactRepository5));
  }
}

代码示例来源:origin: org.dashbuilder/dashbuilder-dataset-editor

@Test
public void testOnProviderTypeSelected() throws Exception {
  when(dataSetProviderTypeWorkflow.getProviderType()).thenReturn(DataSetProviderType.SQL);
  presenter.onProviderTypeSelected(dataSetProviderTypeWorkflow);
  assertEquals(dataSetBasicAttributesWorkflow, presenter.currentWorkflow);
  assertFalse(presenter.isDirty(presenter.getCurrentModelHash()));
  verify(view, times(1)).setWidget(any(IsWidget.class));
  verify(dataSetBasicAttributesWorkflow, times(1)).edit(any(DataSetDef.class));
  verify(editWorkflow, times(1)).showTestButton();
  verify(editWorkflow, times(1)).showBackButton();
  verify(editWorkflow, times(0)).showNextButton();
}

代码示例来源:origin: org.guvnor/guvnor-structure-backend

@Test
public void testWriteWithNullOrigin() {
  String origin = null;
  metadataStore.write("test/repo",
            origin);
  assertEquals("test/repo",
         metadatas.get("/test/repo.metadata").getName());
}

代码示例来源:origin: org.guvnor/guvnor-structure-backend

@Test
public void testWriteNewMetadataWithoutOrigin() {
  metadataStore.write("test/repo");
  assertEquals("test/repo",
         metadatas.get("/test/repo.metadata").getName());
}

代码示例来源:origin: org.uberfire/uberfire-structure-backend

@Test
public void testWriteNewMetadataWithoutOrigin() {
  metadataStore.write("test/repo");
  assertEquals("test/repo",
         metadatas.get("/test/repo.metadata").getName());
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client

@Test
public void getPlaceFromFirstPartTest() {
  PlaceRequest place = mock(PlaceRequest.class);
  PartDefinition part = mock(PartDefinition.class);
  when(part.getPlace()).thenReturn(place);
  Collection<PartDefinition> parts = Arrays.asList(part);
  singlePartHelper = new SinglePartPanelHelper(parts,
                         placeManager);
  assertTrue(!singlePartHelper.hasNoParts());
  assertEquals(place,
         singlePartHelper.getPlaceFromFirstPart());
}

代码示例来源:origin: org.uberfire/uberfire-runtime-plugins-client

@Test
public void newScreenRegisteredTest() {
  screenLayoutDragComponent.onNewPluginRegistered(new NewPluginRegistered("newScreen",
                                      PluginType.SCREEN));
  assertEquals(4,
         screenLayoutDragComponent.getAvailableWorkbenchScreensIds().size());
}

代码示例来源:origin: org.uberfire/uberfire-runtime-plugins-client

@Test
public void existingScreenRegisteredTest() {
  screenLayoutDragComponent.onNewPluginRegistered(new NewPluginRegistered("screen1",
                                      PluginType.SCREEN));
  assertEquals(3,
         screenLayoutDragComponent.getAvailableWorkbenchScreensIds().size());
}

代码示例来源:origin: org.uberfire/uberfire-runtime-plugins-client

@Test
public void newNotScreenPluginRegisteredTest() {
  screenLayoutDragComponent.onNewPluginRegistered(new NewPluginRegistered("newPlugin",
                                      PluginType.EDITOR));
  assertEquals(3,
         screenLayoutDragComponent.getAvailableWorkbenchScreensIds().size());
}

代码示例来源:origin: org.guvnor/guvnor-structure-backend

@Test
public void testSimpleDelete() {
  metadataStore.write("a/repo",
            "");
  assertEquals("",
         metadataStore.read("a/repo").get().getOrigin());
  metadataStore.delete("a/repo");
  assertFalse(metadataStore.read("a/repo").isPresent());
}

代码示例来源:origin: org.uberfire/uberfire-structure-backend

@Test
public void testSimpleDelete() {
  metadataStore.write("a/repo",
            "");
  assertEquals("",
         metadataStore.read("a/repo").get().getOrigin());
  metadataStore.delete("a/repo");
  assertFalse(metadataStore.read("a/repo").isPresent());
}

代码示例来源:origin: org.jbpm/jbpm-wb-forms-modeler-client

@Before
public void init() {
  serviceCaller = new CallerMock<>(service);
  displayer = new TestFormModellerStartProcessDisplayerImpl(rendererWidget,
                               serviceCaller);
  displayer.setNewProcessInstanceEvent(newProcessInstanceEvent);
  displayer.setJSNIHelper(jsniHelper);
  displayer.setNotificationEvent(notificationEvent);
  displayer.setResizeListener(resizeListener);
  assertEquals(rendererWidget,
         displayer.getFormWidget());
}

相关文章

Util类方法