Exemplo n.º 1
0
        public void TestSetGuidEventPositionVal()
        {
            SetGuidEvent eve = new SetGuidEvent(-1, Guid.Empty);
            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetGuid(-1, Guid.Empty)).Return(query);
            }

            using (Mocks.Playback())
            {
                eve.OnEvent(query);
            }
        }
Exemplo n.º 2
0
        public IQuery SetGuid(string name, Guid val)
        {
            IQueryEvent queryEvent = new SetGuidEvent(name, val);

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