public void TestSetDateTimeEventPositionVal() { DateTime now = DateTime.Now; SetDateTimeEvent eve = new SetDateTimeEvent(-1, now); IQuery query = Mock<IQuery>(); using (Mocks.Record()) { Expect.Call(query.SetDateTime(-1, now)).Return(query); } using (Mocks.Playback()) { eve.OnEvent(query); } }
public IQuery SetDateTime(string name, DateTime val) { IQueryEvent queryEvent = new SetDateTimeEvent(name, val); foreach (IShard shard in shards) { if (shard.GetQueryById(queryId) != null) { shard.GetQueryById(queryId).SetDateTime(name, val); } else { shard.AddQueryEvent(queryId, queryEvent); } } return(this); }