Beispiel #1
0
        public void ExceptionAfterDestructor()
        {
            using (JokeHelper.MakeApp())
              {
            var cl = new JokeCalculatorClient(TestServerSyncNode);
            cl.Headers.Add(new NFX.Glue.Protocol.AuthenticationHeader(TestCredentials));

            cl.Init(0);
            cl.Done();

            int result = cl.Add(1);
              }
        }
Beispiel #2
0
        public void Sync_JokeCalculator_TestAdd()
        {
            using (JokeHelper.MakeApp())
              {
            var cl = new JokeCalculatorClient(TestServerSyncNode);
            cl.Headers.Add(new NFX.Glue.Protocol.AuthenticationHeader(TestCredentials));

            using (Scope.OnExit(() => cl.Done()))
            {
              cl.Init(0);
              cl.Add(10);
              int result = cl.Sub(3);

              Assert.AreEqual(7, result);
            }
              }
        }