public void SimpleIntroductionByPropertyTest() { var c = new IntroducedClass(); c.AMethod(); c.AMethod(); Assert.AreEqual("10", IntroductionAdvice.LastRandomString); }
public void SimpleIntroductionByFieldTest() { var c = new IntroducedClass(); c.AMethod(); c.AMethod(); Assert.AreEqual(2, IntroductionAdvice.LastAdvicesCount); }
public void SimpleSharedIntroductionByFieldTest() { var z = SharedIntroductionAdvice.LastSharedAdvicesCount; var c1 = new IntroducedClass(); c1.CMethod(); c1.C2Method(); Assert.AreEqual(2, SharedIntroductionAdvice.LastSharedAdvicesCount - z); }
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); }