Пример #1
0
  public void setUp() {
    eventType = SupportEventTypeFactory.createBeanType(SupportBean_A.class);

    stream = new ZeroDepthStream(eventType);

    testChildView = new SupportSchemaNeutralView();
    stream.addView(testChildView);
    testChildView.setParent(stream);

    eventBean = SupportEventBeanFactory.createObject(new SupportBean_A("a1"));
  }
Пример #2
0
  public void setUp() {
    top = new SupportSchemaNeutralView("top");

    child_1 = new SupportSchemaNeutralView("1");
    child_2 = new SupportSchemaNeutralView("2");
    top.addView(child_1);
    top.addView(child_2);

    child_2_1 = new SupportSchemaNeutralView("2_1");
    child_2_2 = new SupportSchemaNeutralView("2_2");
    child_2.addView(child_2_1);
    child_2.addView(child_2_2);

    child_2_1_1 = new SupportSchemaNeutralView("2_1_1");
    child_2_2_1 = new SupportSchemaNeutralView("2_2_1");
    child_2_2_2 = new SupportSchemaNeutralView("2_2_2");
    child_2_1.addView(child_2_1_1);
    child_2_2.addView(child_2_2_1);
    child_2_2.addView(child_2_2_2);
  }
Пример #3
0
  public void testInsert() {
    testChildView.clearLastNewData();
    stream.insert(eventBean);

    assertTrue(testChildView.getLastNewData() != null);
    assertEquals(1, testChildView.getLastNewData().length);
    assertEquals(eventBean, testChildView.getLastNewData()[0]);

    // Remove view
    testChildView.clearLastNewData();
    stream.removeView(testChildView);
    stream.insert(eventBean);
    assertTrue(testChildView.getLastNewData() == null);
  }