public void TestSetResultTransformerEventResultTransformer() { SetResultTransformerEvent eve = new SetResultTransformerEvent(null); IQuery query = Mock<IQuery>(); using (Mocks.Record()) { Expect.Call(query.SetResultTransformer(null)).Return(query); } using (Mocks.Playback()) { eve.OnEvent(query); } }
public IQuery SetResultTransformer(IResultTransformer resultTransformer) { IQueryEvent queryEvent = new SetResultTransformerEvent(resultTransformer); foreach (IShard shard in shards) { if (shard.GetQueryById(queryId) != null) { shard.GetQueryById(queryId).SetResultTransformer(resultTransformer); } else { shard.AddQueryEvent(queryId, queryEvent); } } return(this); }