Example #1
0
        public void AddAspectThrowsArgumentNullExceptionWhenAspectFactoryIsNull()
        {
            var aspectRegistrationBuilder = new DispatchProxyAspectRegistrationBuilder(new ServiceCollection(), new InMemoryAspectConfigurationProvider());

            Assert.Throws <ArgumentNullException>(() => aspectRegistrationBuilder.AddAspect(default, default));
Example #2
0
        public void AddAspectThrowsArgumentExceptionWhenAspectFactoryDoesNotImplementIAspectFactory()
        {
            var aspectRegistrationBuilder = new DispatchProxyAspectRegistrationBuilder(new ServiceCollection(), new InMemoryAspectConfigurationProvider());

            Assert.Throws <ArgumentException>(() => aspectRegistrationBuilder.AddAspect(GetType()));
        }