示例#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);
            }
        }
示例#2
0
        public void TestCreation()
        {
            CountryCreationListener countryCreationListener = new CountryCreationListener();

            Sxta.Samples.Country.AddIHLAobjectRootCreationListener(countryCreationListener);

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

            Assert.AreEqual(countryCreationListener.LastObject, myCountry);
        }
示例#3
0
        public void TestUpdateValue()
        {
            CountryListener countryListener = new CountryListener();

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

            myCountry.Name = "A COUNTRY";
            Assert.AreEqual(countryListener.LastMethodName, "Name");
            Assert.AreEqual(countryListener.LastValue, myCountry.Name);

            myCountry.Population = 1000;
            Assert.AreEqual(countryListener.LastMethodName, "Population");
            Assert.AreEqual(countryListener.LastValue, myCountry.Population);
        }
示例#4
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);
        }
示例#5
0
        public void TestUpdateValue()
        {
            CountryListener countryListener = new CountryListener();

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

            myCountry.Name = "A COUNTRY";
            Assert.AreEqual(countryListener.LastMethodName, "Name");
            Assert.AreEqual(countryListener.LastValue, myCountry.Name);

            myCountry.Population = 1000;
            Assert.AreEqual(countryListener.LastMethodName, "Population");
            Assert.AreEqual(countryListener.LastValue, myCountry.Population);
        }
示例#6
0
        public void TestCreation()
        {
            CountryCreationListener countryCreationListener = new CountryCreationListener();
            Sxta.Samples.Country.AddIHLAobjectRootCreationListener(countryCreationListener);

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

            Assert.AreEqual(countryCreationListener.LastObject, myCountry);
        }