public void TestCanReuse()
        {
            Assert.IsFalse(_factory.CanReuse(new LastElementView(null)));
            EventType type = SizeView.CreateEventType(SupportStatementContextFactory.MakeContext(), null, 1);

            Assert.IsTrue(_factory.CanReuse(new SizeView(SupportStatementContextFactory.MakeAgentInstanceContext(), type, null)));
        }
Example #2
0
        public void TestSchema()
        {
            EventType type = SizeView.CreateEventType(SupportStatementContextFactory.MakeContext(), null, 1);
            SizeView  view = new SizeView(SupportStatementContextFactory.MakeAgentInstanceContext(), type, null);

            EventType eventType = view.EventType;

            Assert.AreEqual(typeof(long?), eventType.GetPropertyType(ViewFieldEnum.SIZE_VIEW__SIZE.GetName()));
        }
Example #3
0
        public void SetUp()
        {
            // Set up length window view and a test child view
            EventType type = SizeView.CreateEventType(SupportStatementContextFactory.MakeContext(), null, 1);

            _myView = new SizeView(SupportStatementContextFactory.MakeAgentInstanceContext(), type, null);

            _childView = new SupportBeanClassView(typeof(SupportMarketDataBean));
            _myView.AddView(_childView);
        }
Example #4
0
 public void Attach(EventType parentEventType, StatementContext statementContext, ViewFactory optionalParentFactory, IList <ViewFactory> parentViewFactories)
 {
     ExprNode[] validated = ViewFactorySupport.Validate(ViewName, parentEventType, statementContext, _viewParameters, true);
     _additionalProps = StatViewAdditionalProps.Make(validated, 0, parentEventType);
     _eventType       = SizeView.CreateEventType(statementContext, _additionalProps, _streamNumber);
 }