public void TestReverseAlt() { AspectSettings.On = false; var myCode = new MyNormalCode(); var result = myCode.Reverse("hello"); Assert.That(result, Is.EqualTo("olleh")); }
public void TestReverse() { var stubAspect = new Mock<IMyCrossCuttingConcern>(); ObjectFactory.Initialize(x => x.For<IMyCrossCuttingConcern>().Use(stubAspect.Object) ); var myCode = new MyNormalCode(); var result = myCode.Reverse("hello"); Assert.That(result, Is.EqualTo("olleh")); }
public void TestReverse() { var stubAspect = new Mock <IMyCrossCuttingConcern>(); ObjectFactory.Initialize(x => x.For <IMyCrossCuttingConcern>().Use(stubAspect.Object) ); var myCode = new MyNormalCode(); var result = myCode.Reverse("hello"); Assert.That(result, Is.EqualTo("olleh")); }