Пример #1
0
        public void TestConstructorDoesNotSetRequestIdIfResponseCallbackIsNull()
        {
            JetMethod jetMethod = new JetMethod(JetMethod.Info,
                                                null,
                                                null, //No callback specified
                                                1000.0);

            Assert.AreEqual(0, jetMethod.GetRequestId());
        }
Пример #2
0
        public void TestConstructorIncreasesRequestIdIfResponseCallbackIsNotNull()
        {
            JetMethod jetMethod = new JetMethod(JetMethod.Info,
                                                null,
                                                A.Dummy <Action <bool, JToken> >(),
                                                1000.0);

            JetMethod nextJetMethod = new JetMethod(JetMethod.Info,
                                                    null,
                                                    A.Dummy <Action <bool, JToken> >(),
                                                    1000.0);

            Assert.AreEqual(1, nextJetMethod.GetRequestId() - jetMethod.GetRequestId());
        }