コード例 #1
0
ファイル: AOPTests.cs プロジェクト: agustinsantos/Sxta
        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);
        }
コード例 #2
0
ファイル: AOPTests.cs プロジェクト: superliujian/Sxta
        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);
        }