Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Framework
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv16423/Aop/Framework
Modified Files:
AbstractMethodInvocationTests.cs
DynamicMethodInvocationTests.cs
ReflectiveMethodInvocationTests.cs
Log Message:
Added Inheritance-based aop proxy.
Index: DynamicMethodInvocationTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicMethodInvocationTests.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DynamicMethodInvocationTests.cs 2 Aug 2007 16:28:46 -0000 1.1
--- DynamicMethodInvocationTests.cs 6 Feb 2008 18:29:05 -0000 1.2
***************
*** 39,45 ****
public class DynamicMethodInvocationTests : AbstractMethodInvocationTests
{
! protected override AbstractMethodInvocation CreateMethodInvocation(object proxy, object target, MethodInfo method, object[] arguments, Type targetType, IList interceptors)
{
! return new DynamicMethodInvocation(proxy, target, method, arguments, targetType, interceptors);
}
}
--- 39,45 ----
public class DynamicMethodInvocationTests : AbstractMethodInvocationTests
{
! protected override AbstractMethodInvocation CreateMethodInvocation(object proxy, object target, MethodInfo method, MethodInfo onProxyMethod, object[] arguments, Type targetType, IList interceptors)
{
! return new DynamicMethodInvocation(proxy, target, method, onProxyMethod, arguments, targetType, interceptors);
}
}
Index: AbstractMethodInvocationTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Framework/AbstractMethodInvocationTests.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AbstractMethodInvocationTests.cs 2 Aug 2007 16:28:46 -0000 1.1
--- AbstractMethodInvocationTests.cs 6 Feb 2008 18:29:05 -0000 1.2
***************
*** 44,48 ****
{
protected abstract AbstractMethodInvocation CreateMethodInvocation(
! object proxy, object target, MethodInfo method,
object[] arguments, Type targetType, IList interceptors);
--- 44,48 ----
{
protected abstract AbstractMethodInvocation CreateMethodInvocation(
! object proxy, object target, MethodInfo method, MethodInfo onProxyMethod,
object[] arguments, Type targetType, IList interceptors);
***************
*** 51,55 ****
public void InstantiationWithNullMethod()
{
! CreateMethodInvocation(null, this, null, null, GetType(), null);
}
--- 51,55 ----
public void InstantiationWithNullMethod()
{
! CreateMethodInvocation(null, this, null, null, null, GetType(), null);
}
***************
*** 58,62 ****
public void InstantiationWithNullTarget()
{
! CreateMethodInvocation(null, null, null, null, GetType(), null);
}
--- 58,62 ----
public void InstantiationWithNullTarget()
{
! CreateMethodInvocation(null, null, null, null, null, GetType(), null);
}
***************
*** 66,70 ****
Target target = new Target();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, target.GetType(), null);
string score = (string) join.Proceed();
Assert.AreEqual(Target.DefaultScore + Target.Suffix, score);
--- 66,70 ----
Target target = new Target();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, null, target.GetType(), null);
string score = (string) join.Proceed();
Assert.AreEqual(Target.DefaultScore + Target.Suffix, score);
***************
*** 76,80 ****
Target target = new Target();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, target.GetType(), new ArrayList());
string score = (string) join.Proceed();
Assert.AreEqual(Target.DefaultScore + Target.Suffix, score);
--- 76,80 ----
Target target = new Target();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, null, target.GetType(), new ArrayList());
string score = (string) join.Proceed();
Assert.AreEqual(Target.DefaultScore + Target.Suffix, score);
***************
*** 86,90 ****
Target target = new Target();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, target.GetType(), new ArrayList());
CheckToStringDoesntThrowAnException(join);
}
--- 86,90 ----
Target target = new Target();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, null, target.GetType(), new ArrayList());
CheckToStringDoesntThrowAnException(join);
}
***************
*** 95,99 ****
Target target = new Target();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethod(), new string[] { "Five" }, target.GetType(), new ArrayList());
CheckToStringDoesntThrowAnException(join);
}
--- 95,99 ----
Target target = new Target();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethod(), null, new string[] { "Five" }, target.GetType(), new ArrayList());
CheckToStringDoesntThrowAnException(join);
}
***************
*** 104,108 ****
Target target = new TargetWithBadToString();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, target.GetType(), new ArrayList());
// if it hits the target the test will fail with NotSupportedException...
CheckToStringDoesntThrowAnException(join);
--- 104,108 ----
Target target = new TargetWithBadToString();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, null, target.GetType(), new ArrayList());
// if it hits the target the test will fail with NotSupportedException...
CheckToStringDoesntThrowAnException(join);
***************
*** 172,176 ****
IDynamicMock mock = new DynamicMock(typeof (IMethodInterceptor));
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, target.GetType(), new object[] { mock.Object });
mock.ExpectAndReturn("Invoke", target.BullseyeMethod().ToLower(CultureInfo.InvariantCulture));
--- 172,176 ----
IDynamicMock mock = new DynamicMock(typeof (IMethodInterceptor));
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethodNoArgs(), null, null, target.GetType(), new object[] { mock.Object });
mock.ExpectAndReturn("Invoke", target.BullseyeMethod().ToLower(CultureInfo.InvariantCulture));
***************
*** 185,189 ****
BadCommand target = new BadCommand();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethod(), null, target.GetType(), new object[] { });
try
{
--- 185,189 ----
BadCommand target = new BadCommand();
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethod(), null, null, target.GetType(), new object[] { });
try
{
***************
*** 206,210 ****
IDynamicMock mock = new DynamicMock(typeof (IMethodInterceptor));
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethod(), null, target.GetType(), new object[] { mock.Object });
mock.ExpectAndReturn("Invoke", null);
try
--- 206,210 ----
IDynamicMock mock = new DynamicMock(typeof (IMethodInterceptor));
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethod(), null, null, target.GetType(), new object[] { mock.Object });
mock.ExpectAndReturn("Invoke", null);
try
***************
*** 229,233 ****
IDynamicMock mock = new DynamicMock(typeof (IMethodInterceptor));
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethod(), null, target.GetType(), new object[] { mock.Object });
mock.ExpectAndThrow("Invoke", new NotImplementedException());
try
--- 229,233 ----
IDynamicMock mock = new DynamicMock(typeof (IMethodInterceptor));
AbstractMethodInvocation join = CreateMethodInvocation(
! null, target, target.GetTargetMethod(), null, null, target.GetType(), new object[] { mock.Object });
mock.ExpectAndThrow("Invoke", new NotImplementedException());
try
Index: ReflectiveMethodInvocationTests.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Framework/ReflectiveMethodInvocationTests.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ReflectiveMethodInvocationTests.cs 2 Aug 2007 16:28:46 -0000 1.7
--- ReflectiveMethodInvocationTests.cs 6 Feb 2008 18:29:05 -0000 1.8
***************
*** 40,46 ****
public class ReflectiveMethodInvocationTests : AbstractMethodInvocationTests
{
! protected override AbstractMethodInvocation CreateMethodInvocation(object proxy, object target, MethodInfo method, object[] arguments, Type targetType, IList interceptors)
{
! return new ReflectiveMethodInvocation(proxy, target, method, arguments, targetType, interceptors);
}
}
--- 40,46 ----
public class ReflectiveMethodInvocationTests : AbstractMethodInvocationTests
{
! protected override AbstractMethodInvocation CreateMethodInvocation(object proxy, object target, MethodInfo method, MethodInfo onProxyMethod, object[] arguments, Type targetType, IList interceptors)
{
! return new ReflectiveMethodInvocation(proxy, target, method, onProxyMethod, arguments, targetType, interceptors);
}
}
|