Skip to content

Commit

Permalink
fix describe tests after restyling in 52d8263
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Mar 15, 2013
1 parent 086ae44 commit f0e3103
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Expand Up @@ -54,14 +54,14 @@
* @author ajs6f
*/

@Path("")
@Path("/describe")
public class FedoraRepository extends AbstractResource {

private static final Logger logger = LoggerFactory
.getLogger(FedoraRepository.class);

@GET
@Path("/describe/modeshape")
@Path("modeshape")
public Response describeModeshape() throws JsonGenerationException,
JsonMappingException, IOException, RepositoryException {
final Session session = repo.login();
Expand Down Expand Up @@ -97,7 +97,6 @@ public Response describeModeshape() throws JsonGenerationException,
}

@GET
@Path("/describe")
@Produces({TEXT_XML, APPLICATION_XML, APPLICATION_JSON})
public DescribeRepository describe() throws LoginException,
RepositoryException {
Expand All @@ -117,7 +116,6 @@ public DescribeRepository describe() throws LoginException,


@GET
@Path("/describe")
@Produces(TEXT_HTML)
public String describeHtml() throws LoginException,
RepositoryException {
Expand Down
Expand Up @@ -45,13 +45,13 @@ public void testDescribe() throws Exception {
@Test
public void testDescribeHtml() throws Exception {
final HttpGet method = new HttpGet(serverAddress + "describe");
method.addHeader("Accept", TEXT_HTML_TYPE.toString());
method.addHeader("Accept", "text/html");
final HttpResponse response = client.execute(method);
assertEquals(200, response.getStatusLine().getStatusCode());
final String description = EntityUtils.toString(response.getEntity());
logger.debug("Found the repository description:\n" + description);
assertTrue("Failed to find a proper repo version", compile(
"Number Of Objects: ").matcher(
"Number Of Objects").matcher(
description).find());
}

Expand Down

0 comments on commit f0e3103

Please sign in to comment.