Example #1
0
        public static void TestContractB_2(string CONF_SRC)
        {
            var conf = LaconicConfiguration.CreateFromString(CONF_SRC);

            using (var app = new ServiceBaseApplication(null, conf.Root))
            {
                var cl = new TestContractBClient(App.ConfigRoot.AttrByName("cs").Value);

                var person = new PersonData {
                    ID = 10, FirstName = "Joe", LastName = "Tester"
                };

                cl.SetPersonOfTheDay(person);

                var ret = cl.GetPersonOfTheDay();

                Assert.AreEqual(10, ret.ID);
                Assert.AreEqual("Joe", ret.FirstName);
                Assert.AreEqual("Tester", ret.LastName);

                var sum = cl.SummarizeAndFinish(); //destructor

                Assert.AreEqual("That is all! for the person Tester", sum);

                cl.ForgetRemoteInstance();

                Assert.AreEqual("Felix", cl.GetName()); //this will allocate the new isntance

                sum = cl.SummarizeAndFinish();          // this will kill the instance again
                Assert.AreEqual("That is all! but no person of the day was set", sum);

                dumpBindingTransports(cl.Binding);
            }
        }
Example #2
0
        public static void TestContractB_1(string CONF_SRC)
        {
            var conf = LaconicConfiguration.CreateFromString(CONF_SRC);

            using (var app = new ServiceBaseApplication(null, conf.Root))
            {
                var cl = new TestContractBClient(App.ConfigRoot.AttrByName("cs").Value);

                var person = new PersonData {
                    ID = 10, FirstName = "Joe", LastName = "Tester"
                };

                cl.SetPersonOfTheDay(person);

                var ret = cl.GetPersonOfTheDay();

                Assert.AreEqual(10, ret.ID);
                Assert.AreEqual("Joe", ret.FirstName);
                Assert.AreEqual("Tester", ret.LastName);

                dumpBindingTransports(cl.Binding);
            }
        }
Example #3
0
        public static void TestContractB_2(string CONF_SRC)
        {
            var conf = LaconicConfiguration.CreateFromString(CONF_SRC);
            using( var app = new ServiceBaseApplication(null, conf.Root))
            {
                var cl = new TestContractBClient(App.ConfigRoot.AttrByName("cs").Value);

                var person = new PersonData{ID = 10, FirstName="Joe", LastName="Tester" };

                cl.SetPersonOfTheDay( person );

                var ret = cl.GetPersonOfTheDay();

                Assert.AreEqual( 10, ret.ID);
                Assert.AreEqual( "Joe", ret.FirstName);
                Assert.AreEqual( "Tester", ret.LastName);

                var sum = cl.SummarizeAndFinish(); //destructor

                Assert.AreEqual("That is all! for the person Tester", sum);

                cl.ForgetRemoteInstance();

                Assert.AreEqual("Felix", cl.GetName()); //this will allocate the new isntance

                sum = cl.SummarizeAndFinish(); // this will kill the instance again
                Assert.AreEqual("That is all! but no person of the day was set", sum);

                dumpBindingTransports( cl.Binding );
            }
        }
Example #4
0
        public static void TestContractB_1(string CONF_SRC)
        {
            var conf = LaconicConfiguration.CreateFromString(CONF_SRC);
            using( var app = new ServiceBaseApplication(null, conf.Root))
            {
                var cl = new TestContractBClient(App.ConfigRoot.AttrByName("cs").Value);

                var person = new PersonData{ID = 10, FirstName="Joe", LastName="Tester" };

                cl.SetPersonOfTheDay( person );

                var ret = cl.GetPersonOfTheDay();

                Assert.AreEqual( 10, ret.ID);
                Assert.AreEqual( "Joe", ret.FirstName);
                Assert.AreEqual( "Tester", ret.LastName);

                dumpBindingTransports( cl.Binding );
            }
        }