public void TestSetIntegerEventPositionVal()
        {
            SetIntegerEvent eve = new SetIntegerEvent(-1, 1);
            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetInt32(-1, 1)).Return(query);
            }

            using (Mocks.Playback())
            {
                eve.OnEvent(query);
            }
        }
Esempio n. 2
0
        public IQuery SetInt32(string name, int val)
        {
            IQueryEvent queryEvent = new SetIntegerEvent(name, val);

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