Example #1
0
 public void testGetPropertyType() {
   assertEquals(
       String.class,
       nested[0].getPropertyType(
           (BeanEventType) event.getEventType(), SupportEventAdapterService.getService()));
   assertEquals(
       String.class,
       nested[1].getPropertyType(
           (BeanEventType) event.getEventType(), SupportEventAdapterService.getService()));
 }
Example #2
0
  public void testGetGetter() {
    EventPropertyGetter getter =
        nested[0].getGetter(
            (BeanEventType) event.getEventType(), SupportEventAdapterService.getService());
    assertEquals("nestedValue", getter.get(event));

    getter =
        nested[1].getGetter(
            (BeanEventType) event.getEventType(), SupportEventAdapterService.getService());
    assertEquals("nestedNestedValue", getter.get(event));
  }
  protected void setUp() {
    eventService = SupportEventAdapterService.getService();
    EventType underlyingEventTypeSimple =
        eventService.addBeanType("underlyingSimpleBean", SupportBeanSimple.class, true, true, true);
    EventType underlyingEventTypeCombined =
        eventService.addBeanType(
            "underlyingCombinedBean", SupportBeanCombinedProps.class, true, true, true);

    Map<String, Object> typeMap = new HashMap<String, Object>();
    typeMap.put("string", String.class);
    typeMap.put("int", Integer.class);

    EventTypeMetadata meta = EventTypeMetadata.createWrapper("test", true, false, false);
    eventTypeSimple =
        new WrapperEventType(meta, "mytype", 1, underlyingEventTypeSimple, typeMap, eventService);
    eventTypeCombined =
        new WrapperEventType(meta, "mytype", 1, underlyingEventTypeCombined, typeMap, eventService);
    properties = new HashMap<String, Object>();
    properties.put("string", "xx");
    properties.put("int", 11);

    EventBean wrappedSimple = eventService.adapterForBean(new SupportBeanSimple("eventString", 0));
    eventBeanSimple =
        eventService.adapterForTypedWrapper(wrappedSimple, properties, eventTypeSimple);

    EventBean wrappedCombined =
        eventService.adapterForBean(SupportBeanCombinedProps.makeDefaultBean());
    eventBeanCombined =
        eventService.adapterForTypedWrapper(wrappedCombined, properties, eventTypeCombined);
  }
Example #4
0
  public void setUp() {
    beanEventTypeFactory =
        new BeanEventAdapter(
            new ConcurrentHashMap<Class, BeanEventType>(),
            SupportEventAdapterService.getService(),
            new EventTypeIdGeneratorImpl());

    nested = new NestedProperty[2];
    nested[0] = makeProperty(new String[] {"nested", "nestedValue"});
    nested[1] = makeProperty(new String[] {"nested", "nestedNested", "nestedNestedValue"});

    event = SupportEventBeanFactory.createObject(SupportBeanComplexProps.makeDefaultBean());
  }
  public void setUp() throws ExprValidationException {
    SelectExprEventTypeRegistry selectExprEventTypeRegistry =
        new SelectExprEventTypeRegistry(new HashSet<String>());
    SupportStreamTypeSvc3Stream supportTypes = new SupportStreamTypeSvc3Stream();

    processor =
        new SelectExprJoinWildcardProcessor(
            Collections.<Integer>emptyList(),
            "id",
            supportTypes.getStreamNames(),
            supportTypes.getEventTypes(),
            SupportEventAdapterService.getService(),
            null,
            selectExprEventTypeRegistry,
            null,
            null);
  }