public void CanOnlyAddMethodInterceptors()
{
ProxyFactory factory = new ProxyFactory(new TestObject());
factory.AddAdvice(0, new NopInterceptor());
try
{
factory.AddAdvice(0, new AnonymousClassInterceptor());
Assert.Fail("Should only be able to add MethodInterceptors");
}
catch (AopConfigException)
{
}
// Check we can still use it
IOther other = (IOther)factory.GetProxy();
other.Absquatulate();
}