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"); }
public void Weave() { var provider = new AttributiveAspectProvider(); var aspect = provider.GetDefinition(typeof(TestNotifyPropertiesAspect)); target = WeaveTestHelper.WeaveAndLoadType(GetType(), aspect, typeof(NotifyPropertiesSut)); ((object)target).MonitorEvents(); }