public void AddAspectThrowsArgumentNullExceptionWhenAspectFactoryIsNull() { var aspectRegistrationBuilder = new DispatchProxyAspectRegistrationBuilder(new ServiceCollection(), new InMemoryAspectConfigurationProvider()); Assert.Throws <ArgumentNullException>(() => aspectRegistrationBuilder.AddAspect(default, default));
public void AddAspectThrowsArgumentExceptionWhenAspectFactoryDoesNotImplementIAspectFactory() { var aspectRegistrationBuilder = new DispatchProxyAspectRegistrationBuilder(new ServiceCollection(), new InMemoryAspectConfigurationProvider()); Assert.Throws <ArgumentException>(() => aspectRegistrationBuilder.AddAspect(GetType())); }