Esempio n. 1
0
        public void TestSetTimeEventPositionVal()
        {
            DateTime now = DateTime.Now;
            SetTimeEvent eve = new SetTimeEvent(-1, now);
            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetTime(-1, now)).Return(query);
            }

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

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