Search in sources :

Example 1 with AssertionBuilderRegistryImpl

use of org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl in project cxf by apache.

the class Wsdl11AttachmentPolicyProviderTest method setUp.

@Before
public void setUp() {
    control = EasyMock.createNiceControl();
    bus = control.createMock(Bus.class);
    bus.getExtension(ConfiguredBeanLocator.class);
    EasyMock.expectLastCall().andReturn(null).anyTimes();
    AssertionBuilderRegistry abr = new AssertionBuilderRegistryImpl();
    abr.setIgnoreUnknownAssertions(false);
    PrimitiveAssertionBuilder ab = new PrimitiveAssertionBuilder();
    abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "A"), ab);
    abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "B"), ab);
    abr.registerBuilder(new QName("http://cxf.apache.org/test/assertions", "C"), ab);
    PolicyBuilderImpl pb = new PolicyBuilderImpl();
    bus.getExtension(PolicyBuilder.class);
    EasyMock.expectLastCall().andReturn(pb).anyTimes();
    bus.getExtension(PolicyEngine.class);
    EasyMock.expectLastCall().andReturn(null).anyTimes();
    pb.setAssertionBuilderRegistry(abr);
    app = new Wsdl11AttachmentPolicyProvider();
    app.setBuilder(pb);
    app.setRegistry(new PolicyRegistryImpl());
    control.replay();
}
Also used : AssertionBuilderRegistry(org.apache.cxf.ws.policy.AssertionBuilderRegistry) Bus(org.apache.cxf.Bus) PolicyBuilderImpl(org.apache.cxf.ws.policy.PolicyBuilderImpl) QName(javax.xml.namespace.QName) PolicyRegistryImpl(org.apache.cxf.ws.policy.PolicyRegistryImpl) PrimitiveAssertionBuilder(org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertionBuilder) AssertionBuilderRegistryImpl(org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl) Before(org.junit.Before)

Aggregations

QName (javax.xml.namespace.QName)1 Bus (org.apache.cxf.Bus)1 AssertionBuilderRegistry (org.apache.cxf.ws.policy.AssertionBuilderRegistry)1 AssertionBuilderRegistryImpl (org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl)1 PolicyBuilderImpl (org.apache.cxf.ws.policy.PolicyBuilderImpl)1 PolicyRegistryImpl (org.apache.cxf.ws.policy.PolicyRegistryImpl)1 PrimitiveAssertionBuilder (org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertionBuilder)1 Before (org.junit.Before)1