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