コード例 #1
0
ファイル: IntroductionTest.cs プロジェクト: csuffyy/MrAdvice
        public void SimpleIntroductionByPropertyTest()
        {
            var c = new IntroducedClass();
            c.AMethod();
            c.AMethod();

            Assert.AreEqual("10", IntroductionAdvice.LastRandomString);
        }
コード例 #2
0
ファイル: IntroductionTest.cs プロジェクト: csuffyy/MrAdvice
        public void SimpleIntroductionByFieldTest()
        {
            var c = new IntroducedClass();
            c.AMethod();
            c.AMethod();

            Assert.AreEqual(2, IntroductionAdvice.LastAdvicesCount);
        }
コード例 #3
0
        public void SimpleIntroductionByPropertyTest()
        {
            var c = new IntroducedClass();

            c.AMethod();
            c.AMethod();

            Assert.AreEqual("10", IntroductionAdvice.LastRandomString);
        }
コード例 #4
0
        public void SimpleIntroductionByFieldTest()
        {
            var c = new IntroducedClass();

            c.AMethod();
            c.AMethod();

            Assert.AreEqual(2, IntroductionAdvice.LastAdvicesCount);
        }
コード例 #5
0
        public void SimpleSharedIntroductionByFieldTest()
        {
            var z = SharedIntroductionAdvice.LastSharedAdvicesCount;

            var c1 = new IntroducedClass();

            c1.CMethod();
            c1.C2Method();

            Assert.AreEqual(2, SharedIntroductionAdvice.LastSharedAdvicesCount - z);
        }
コード例 #6
0
ファイル: IntroductionTest.cs プロジェクト: csuffyy/MrAdvice
        public void SimpleStaticIntroductionByFieldTest()
        {
            var z = StaticIntroductionAdvice.LastStaticAdvicesCount;

            var c1 = new IntroducedClass();
            var c2 = new IntroducedClass();
            c1.BMethod();
            c2.BMethod();

            Assert.AreEqual(2, StaticIntroductionAdvice.LastStaticAdvicesCount - z);
        }
コード例 #7
0
        public void SimpleStaticIntroductionByFieldTest()
        {
            var z = StaticIntroductionAdvice.LastStaticAdvicesCount;

            var c1 = new IntroducedClass();
            var c2 = new IntroducedClass();

            c1.BMethod();
            c2.BMethod();

            Assert.AreEqual(2, StaticIntroductionAdvice.LastStaticAdvicesCount - z);
        }