public void MPX_JokeContract_Expected_Security_Exception() { using (var app = JokeHelper.MakeApp()) { var cl = new JokeContractClient(app.Glue, TestServerMpxNode); var result = cl.Echo("Blah");//throws sec exception } }
public void ExceptionBeforeInit() { using (var app = JokeHelper.MakeApp()) { var cl = new JokeCalculatorClient(app.Glue, TestServerSyncNode); cl.Headers.Add(new Azos.Glue.Protocol.AuthenticationHeader(TestCredentials)); int result = cl.Add(1); } }
public void MPX_JokeContract_Echo_ByCode() { using (var app = JokeHelper.MakeApp()) { var cl = new JokeContractClient(app.Glue, TestServerMpxNode); cl.Headers.Add(new AuthenticationHeader(TestCredentials)); var result = cl.Echo("Gello A!"); Aver.IsTrue(result.StartsWith("Server echoed Gello A!")); } }
public void Sync_JokeContract_Async_Echo_ByCode() { using (var app = JokeHelper.MakeApp()) { var cl = new JokeContractClient(app.Glue, TestServerSyncNode); cl.Headers.Add(new AuthenticationHeader(TestCredentials)); var call = cl.Async_Echo("Gello B!"); var result = call.GetValue <string>(); Aver.IsTrue(result.StartsWith("Server echoed Gello B!")); } }
public void Sync_JokeCalculator_TestAdd() { using (var app = JokeHelper.MakeApp()) { var cl = new JokeCalculatorClient(app.Glue, TestServerSyncNode); cl.Headers.Add(new Azos.Glue.Protocol.AuthenticationHeader(TestCredentials)); try { cl.Init(0); cl.Add(10); int result = cl.Sub(3); Aver.AreEqual(7, result); } finally { cl.Done(); } } }