コード例 #1
0
        public void TestReverseAlt()
        {
            AspectSettings.On = false;

            var myCode = new MyNormalCode();
            var result = myCode.Reverse("hello");

            Assert.That(result, Is.EqualTo("olleh"));
        }
コード例 #2
0
        public void TestReverseAlt()
        {
            AspectSettings.On = false;

            var myCode = new MyNormalCode();
            var result = myCode.Reverse("hello");

            Assert.That(result, Is.EqualTo("olleh"));
        }
コード例 #3
0
        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"));
        }
コード例 #4
0
        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"));
        }