Ejemplo n.º 1
0
        public void TestCreationAndUpdateValue()
        {
            CountryListener2 countryListener = new CountryListener2();

            Sxta.Samples.Country.AddIHLAobjectRootCreationListener(countryListener);

            Sxta.Samples.Country myCountry = new Sxta.Samples.Country();

            Sxta.Samples.Country countryProxy = countryListener.LastObject as Sxta.Samples.Country;

            myCountry.AddIHLAobjectRootListener(countryListener);

            myCountry.Name = "A COUNTRY";
            Assert.AreEqual(countryListener.LastMethodName, "Name");
            Assert.AreEqual(countryListener.LastValue, myCountry.Name);
            Assert.AreEqual(myCountry.Name, countryProxy.Name);
            if (log.IsDebugEnabled)
            {
                log.Debug("After Country.Name is modified the object is " + countryProxy);
            }

            myCountry.Population = 1000;
            Assert.AreEqual(countryListener.LastMethodName, "Population");
            Assert.AreEqual(countryListener.LastValue, myCountry.Population);
            Assert.AreEqual(myCountry.Population, countryProxy.Population);
            if (log.IsDebugEnabled)
            {
                log.Debug("After Country.Population is modified the object is " + countryProxy);
            }
        }
Ejemplo n.º 2
0
        public void TestCreationAndUpdateValue()
        {
            CountryListener2 countryListener = new CountryListener2();
            Sxta.Samples.Country.AddIHLAobjectRootCreationListener(countryListener);

            Sxta.Samples.Country myCountry = new Sxta.Samples.Country();

            Sxta.Samples.Country countryProxy = countryListener.LastObject as Sxta.Samples.Country;

            myCountry.AddIHLAobjectRootListener(countryListener);

            myCountry.Name = "A COUNTRY";
            Assert.AreEqual(countryListener.LastMethodName, "Name");
            Assert.AreEqual(countryListener.LastValue, myCountry.Name);
            Assert.AreEqual(myCountry.Name, countryProxy.Name);
            if (log.IsDebugEnabled)
                log.Debug("After Country.Name is modified the object is " + countryProxy);

            myCountry.Population = 1000;
            Assert.AreEqual(countryListener.LastMethodName, "Population");
            Assert.AreEqual(countryListener.LastValue, myCountry.Population);
            Assert.AreEqual(myCountry.Population, countryProxy.Population);
            if (log.IsDebugEnabled)
                log.Debug("After Country.Population is modified the object is " + countryProxy);
        }