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))); }
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())); }
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); }
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); }