Skip to content

Commit

Permalink
Fix test breakage after changes in GeoToolsl - [GEOT-5902] Fixed Enco…
Browse files Browse the repository at this point in the history
…der setters
  • Loading branch information
aaime committed Dec 16, 2017
1 parent 733c0a6 commit 51ecb0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/ows/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
<artifactId>mail</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
6 changes: 5 additions & 1 deletion src/ows/src/test/java/org/geoserver/ows/DispatcherTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,20 @@

import junit.framework.TestCase;

import org.custommonkey.xmlunit.XMLUnit;
import org.geoserver.ows.TestDispatcherCallback.Status;
import org.geoserver.platform.Operation;
import org.geoserver.platform.Service;
import org.geoserver.test.CodeExpectingHttpServletResponse;
import org.geotools.util.Version;
import org.geotools.xml.XMLUtils;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.web.servlet.ModelAndView;

import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.DelegatingServletInputStream;
import org.w3c.dom.Document;


public class DispatcherTest extends TestCase {
Expand Down Expand Up @@ -976,7 +979,8 @@ public void testErrorThrowingResponse() throws Exception {
final String outputContent = response.getContentAsString();
assertThat(outputContent, not(containsString("Hello world!")));
// only the exception
assertThat(outputContent, startsWith("<ows:Exception"));
Document dom = XMLUnit.buildTestDocument(outputContent);
assertEquals("ows:ExceptionReport", dom.getDocumentElement().getNodeName());
}
}
}

0 comments on commit 51ecb0d

Please sign in to comment.