public void CreatesProxyOnTypeNameMatch()
 {
     TypeNameAutoProxyCreator apc = new TypeNameAutoProxyCreator();
     apc.TypeNames = new string[] { "Spring.Objects.Test*", "*MyLocal*" };
     
     object result = apc.PostProcessAfterInitialization( new TestObject(), "testObject" );
     Assert.IsTrue( AopUtils.IsAopProxy( result ) );
     result = apc.PostProcessAfterInitialization( new MyLocalTestObject(), "myLocalTestObject" );
     Assert.IsTrue( AopUtils.IsAopProxy( result ) );
 }
    public void AllowsEmptyTypeNameList()
    {
        TypeNameAutoProxyCreator apc = new TypeNameAutoProxyCreator();
        apc.TypeNames = new string[] {};       
 
        apc.PostProcessAfterInitialization( new TestObject(), "testObject" );
    }
 public void DoesNotCreateProxyIfNoTypeNameMatch()
 {
     TypeNameAutoProxyCreator apc = new TypeNameAutoProxyCreator();
     apc.TypeNames = new string[] { "Foo*" };
     
     object result = apc.PostProcessAfterInitialization( new TestObject(), "testObject" );
     Assert.IsFalse( AopUtils.IsAopProxy( result ) );
 }
 public void ThrowsOnMissingTypeNames()
 {
     TypeNameAutoProxyCreator apc = new TypeNameAutoProxyCreator();
     apc.PostProcessAfterInitialization( new TestObject(), "testObject" );
 }
 public void ThrowsOnMissingTypeNames()
 {
     TypeNameAutoProxyCreator apc = new TypeNameAutoProxyCreator();
     Assert.Throws<ArgumentNullException>(() => apc.PostProcessAfterInitialization(new TestObject(), "testObject"));
 }