1 package com.thoughtworks.acceptance; 2 3 import com.thoughtworks.acceptance.objects.SampleDynamicProxy; 4 import com.thoughtworks.xstream.converters.extended.DynamicProxyConverter; 5 6 public class DynamicProxyTest extends AbstractAcceptanceTest { 7 8 public void testDynamicProxy() { 9 xstream.registerConverter(new DynamicProxyConverter(xstream.getClassMapper())); 10 11 assertBothWays(SampleDynamicProxy.newInstance(), 12 "<dynamic-proxy>\n" + 13 " <interface>com.thoughtworks.acceptance.objects.SampleDynamicProxy-InterfaceOne</interface>\n" + 14 " <interface>com.thoughtworks.acceptance.objects.SampleDynamicProxy-InterfaceTwo</interface>\n" + 15 " <handler class=\"com.thoughtworks.acceptance.objects.SampleDynamicProxy\">\n" + 16 " <aField>hello</aField>\n" + 17 " </handler>\n" + 18 "</dynamic-proxy>"); 19 } 20 21 } 22 | Popular Tags |