private void TryParameter(Object[] param, int size) { var factory = new LengthWindowViewFactory(); factory.SetViewParameters(SupportStatementContextFactory.MakeViewContext(), TestViewSupport.ToExprListBean(param)); var view = (LengthWindowView)factory.MakeView(SupportStatementContextFactory.MakeAgentInstanceViewFactoryContext()); Assert.AreEqual(size, view.Size); }
/// <summary> /// Constructor creates a moving window extending the specified number of elements into the past. /// </summary> /// <param name="agentInstanceViewFactoryContext">The agent instance view factory context.</param> /// <param name="lengthWindowViewFactory">for copying this view in a group-by</param> /// <param name="size">is the specified number of elements into the past</param> public LengthWindowViewRStream(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext, LengthWindowViewFactory lengthWindowViewFactory, int size) { if (size < 1) { throw new ArgumentException("Illegal argument for size of length window"); } _agentInstanceViewFactoryContext = agentInstanceViewFactoryContext; _lengthWindowViewFactory = lengthWindowViewFactory; _size = size; _indexedEvents = new LinkedHashSet <EventBean>(); }
/// <summary> /// Constructor creates a moving window extending the specified number of elements into the past. /// </summary> /// <param name="agentInstanceViewFactoryContext">The agent instance view factory context.</param> /// <param name="lengthWindowViewFactory">for copying this view in a group-by</param> /// <param name="size">is the specified number of elements into the past</param> /// <param name="viewUpdatedCollection">is a collection that the view must Update when receiving events</param> public LengthWindowView( AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext, LengthWindowViewFactory lengthWindowViewFactory, int size, ViewUpdatedCollection viewUpdatedCollection) { if (size < 1) { throw new ArgumentException("Illegal argument for size of length window"); } _agentInstanceViewFactoryContext = agentInstanceViewFactoryContext; _lengthWindowViewFactory = lengthWindowViewFactory; _size = size; _viewUpdatedCollection = viewUpdatedCollection; }
public void SetUp() { _factory = new LengthWindowViewFactory(); }
public void SetUp() { _container = SupportContainer.Reset(); _factory = new LengthWindowViewFactory(); }