Changeset 3184
- Timestamp:
- 07/24/13 08:45:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/rest/NotebooksTest.java
r3168 r3184 33 33 import java.util.UUID; 34 34 import javax.ws.rs.core.MediaType; 35 import javax.xml.bind.JAXBElement; 36 import javax.xml.namespace.QName; 35 37 import org.jmock.Expectations; 36 38 import static org.jmock.Expectations.returnValue; … … 169 171 */ 170 172 @Test 171 @Ignore172 173 public void testModifyNotebook_String() { 173 174 System.out.println("testModifyNotebook_String"); 174 175 final Notebook notebook = new Notebook(); 176 // this JAXBElement should be returned by the generated ObjectFactory, however it is not. This could be due to name space polution in the schema? 177 // todo: this JAXBElement should be removed and replaced by the same as returned by the ObjectFactory when cause of it not being auto generated is resolved, in the mean time this line below makes it clear where the issue starts from. 178 final JAXBElement<Notebook> jaxbElement = new JAXBElement<Notebook>(new QName("http://www.dasish.eu/ns/addit", "notebook"), Notebook.class, null, notebook); 175 179 notebook.setTitle("a title"); 176 ClientResponse response = resource().path("notebooks/_nid_").type(MediaType.APPLICATION_XML).accept(MediaType.APPLICATION_XML).put(ClientResponse.class, notebook);177 assertEquals(200, response.getStatus()); 178 assertEquals("modifyNotebook _nid_ ", response.getEntity(String.class));180 ClientResponse response = resource().path("notebooks/_nid_").type(MediaType.APPLICATION_XML).accept(MediaType.APPLICATION_XML).put(ClientResponse.class, jaxbElement); 181 assertEquals(200, response.getStatus()); 182 assertEquals("modifyNotebook _nid_a title", response.getEntity(String.class)); 179 183 } 180 184
Note: See TracChangeset
for help on using the changeset viewer.