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