Beispiel #1
0
        public void AspectInstanceShouldContainAttributeInformation()
        {
            var instance = new TestTarget();
            var aspect   = new AttributiveAspectProvider().GetLifecycle(typeof(TestWithOnMemberBoundaryAttribute))
                           .GetAspect(JointPoints.Method(() => instance.DecoratedMethod()));

            aspect.Should().CastTo <TestWithOnMemberBoundaryAttribute>().Text.Should().Be("MyTest");
        }
Beispiel #2
0
        public void Weave()
        {
            var provider = new AttributiveAspectProvider();
            var aspect   = provider.GetDefinition(typeof(TestNotifyPropertiesAspect));

            target = WeaveTestHelper.WeaveAndLoadType(GetType(), aspect, typeof(NotifyPropertiesSut));
            ((object)target).MonitorEvents();
        }