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); } }
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); } } }
private void btnInit_Click(object sender, EventArgs e) { calc = new JokeCalculatorClient(cbo.Text); calc.Init(tbCalc.Text.AsInt()); }