Example #1
0
        public void TestSetStringEventPositionVal()
        {
            SetStringEvent eve = new SetStringEvent(-1, null);
            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetString(-1, null)).Return(query);
            }

            using (Mocks.Playback())
            {
                eve.OnEvent(query);
            }
        }
Example #2
0
        public IQuery SetString(int position, string val)
        {
            IQueryEvent queryEvent = new SetStringEvent(position, val);

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