コード例 #1
0
ファイル: SetDoubleEventTest.cs プロジェクト: spib/nhcontrib
        public void TestSetBinaryEventPositionVal()
        {
            SetDoubleEvent eve = new SetDoubleEvent(-1, -1.0d);
            IQuery query = Mock<IQuery>();
            using (Mocks.Record())
            {
                Expect.Call(query.SetDouble(-1, -1.0d)).Return(query);
            }

            using (Mocks.Playback())
            {
                eve.OnEvent(query);
            }
        }
コード例 #2
0
        public IQuery SetDouble(string name, double val)
        {
            IQueryEvent queryEvent = new SetDoubleEvent(name, val);

            foreach (IShard shard in shards)
            {
                if (shard.GetQueryById(queryId) != null)
                {
                    shard.GetQueryById(queryId).SetDouble(name, val);
                }
                else
                {
                    shard.AddQueryEvent(queryId, queryEvent);
                }
            }
            return(this);
        }