Exemplo n.º 1
0
        public void TestSetPropertiesEventBean()
        {
            SetPropertiesEvent eve = new SetPropertiesEvent(null);
            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetProperties(null)).Return(query);
            }

            using (Mocks.Playback())
            {
                eve.OnEvent(query);
            }
        }
Exemplo n.º 2
0
        public IQuery SetProperties(object obj)
        {
            IQueryEvent queryEvent = new SetPropertiesEvent(obj);

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