Exemple #1
0
        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
            }
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        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!"));
            }
        }
Exemple #4
0
        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!"));
            }
        }
Exemple #5
0
        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();
                }
            }
        }