public void TestSetDateTimeEventPositionVal()
        {
            SetDecimalEvent eve = new SetDecimalEvent(-1, -1 );

            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetDecimal(-1, -1)).Return(query);
            }

            using (Mocks.Playback())
            {
                eve.OnEvent(query);
            }
        }
        public void TestSetDecimalEventNameVal()
        {
            SetDecimalEvent eve = new SetDecimalEvent(null, -1);

            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetDecimal(null, -1)).Return(query);
            }

            using (Mocks.Playback())
            {
                eve.OnEvent(query);
            }
        }
Ejemplo n.º 3
0
        public IQuery SetDecimal(string name, decimal val)
        {
            IQueryEvent queryEvent = new SetDecimalEvent(name, val);

            foreach (IShard shard in shards)
            {
                if (shard.GetQueryById(queryId) != null)
                {
                    shard.GetQueryById(queryId).SetDecimal(name, val);
                }
                else
                {
                    shard.AddQueryEvent(queryId, queryEvent);
                }
            }
            return(this);
        }