private void TryParameter(Object[] param, int size)
        {
            var factory = new LengthBatchViewFactory();

            factory.SetViewParameters(SupportStatementContextFactory.MakeViewContext(_container), TestViewSupport.ToExprListBean(param));
            var view = (LengthBatchView)factory.MakeView(SupportStatementContextFactory.MakeAgentInstanceViewFactoryContext(_container));

            Assert.AreEqual(size, view.Size);
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="agentInstanceViewFactoryContext">The agent instance view factory context.</param>
        /// <param name="lengthBatchViewFactory">for copying this view in a group-by</param>
        /// <param name="size">is the number of events to batch</param>
        public LengthBatchViewRStream(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext,
                                      LengthBatchViewFactory lengthBatchViewFactory,
                                      int size)
        {
            _lengthBatchViewFactory = lengthBatchViewFactory;
            _size = size;
            AgentInstanceViewFactoryContext = agentInstanceViewFactoryContext;

            if (size <= 0)
            {
                throw new ArgumentException("Invalid size parameter, size=" + size);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="agentInstanceViewFactoryContext">The agent instance view factory context.</param>
        /// <param name="lengthBatchViewFactory">for copying this view in a group-by</param>
        /// <param name="size">is the number of events to batch</param>
        /// <param name="viewUpdatedCollection">is a collection that the view must Update when receiving events</param>
        public LengthBatchView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext,
                               LengthBatchViewFactory lengthBatchViewFactory,
                               int size,
                               ViewUpdatedCollection viewUpdatedCollection)
        {
            AgentInstanceViewFactoryContext = agentInstanceViewFactoryContext;
            _lengthBatchViewFactory         = lengthBatchViewFactory;
            _size = size;
            _viewUpdatedCollection = viewUpdatedCollection;

            if (size <= 0)
            {
                throw new ArgumentException("Invalid size parameter, size=" + size);
            }
        }
 public void SetUp()
 {
     _container = SupportContainer.Reset();
     _factory   = new LengthBatchViewFactory();
 }
Esempio n. 5
0
 public void SetUp()
 {
     _factory = new LengthBatchViewFactory();
 }