Example #1
0
        public void TestSetDoubleEventPositionVal()
        {
            SetBinaryEvent eve = new SetBinaryEvent(-1, new byte[]{0x0});
            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetBinary(-1, new byte[]{0x0})).Return(query);
            }

            using (Mocks.Playback())
            {
                eve.OnEvent(query);
            }
        }
Example #2
0
        public IQuery SetBinary(string name, byte[] val)
        {
            IQueryEvent queryEvent = new SetBinaryEvent(name, val);

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