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

            int result = cl.Add(1);
              }
        }
示例#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);
            }
              }
        }
示例#3
0
文件: GlueForm.cs 项目: itadapter/nfx
 private void btnInit_Click(object sender, EventArgs e)
 {
     calc = new JokeCalculatorClient(cbo.Text);
     calc.Init(tbCalc.Text.AsInt());
 }