use of org.apache.cxf.ws.transfer.Delete in project cxf by apache.
the class ResourceTest method deleteRequestTest.
@Test
public void deleteRequestTest() {
ResourceManager manager = EasyMock.createMock(ResourceManager.class);
manager.delete(EasyMock.isA(ReferenceParametersType.class));
EasyMock.expectLastCall().once();
EasyMock.replay(manager);
ReferenceParametersType refParams = new ReferenceParametersType();
Element uuid = document.createElementNS(MemoryResourceManager.REF_NAMESPACE, MemoryResourceManager.REF_LOCAL_NAME);
uuid.setTextContent(UUID_VALUE);
refParams.getAny().add(uuid);
Server server = createLocalResource(manager);
Resource client = createClient(refParams);
client.delete(new Delete());
EasyMock.verify(manager);
server.destroy();
}
use of org.apache.cxf.ws.transfer.Delete in project cxf by apache.
the class DeleteTest method deleteTeacher.
@Test
public void deleteTeacher() throws XMLStreamException {
CreateResponse response = createTeacher();
Resource client = TestUtils.createResourceClient(response.getResourceCreated());
client.delete(new Delete());
}
use of org.apache.cxf.ws.transfer.Delete in project cxf by apache.
the class DeleteTest method deleteStudent.
@Test
public void deleteStudent() throws XMLStreamException {
CreateResponse response = createStudent();
Resource client = TestUtils.createResourceClient(response.getResourceCreated());
client.delete(new Delete());
}
use of org.apache.cxf.ws.transfer.Delete in project cxf by apache.
the class DeleteTest method getDeletedTeacher.
@Test(expected = SOAPFaultException.class)
public void getDeletedTeacher() throws XMLStreamException {
CreateResponse response = createTeacher();
Resource client = TestUtils.createResourceClient(response.getResourceCreated());
client.delete(new Delete());
client.get(new Get());
}
use of org.apache.cxf.ws.transfer.Delete in project cxf by apache.
the class DeleteTest method deleteDeletedTeacher.
@Test(expected = SOAPFaultException.class)
public void deleteDeletedTeacher() throws XMLStreamException {
CreateResponse response = createTeacher();
Resource client = TestUtils.createResourceClient(response.getResourceCreated());
client.delete(new Delete());
client.delete(new Delete());
}
Aggregations