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