示例#1
0
 @Test
 public void testPipelineWithTwoTransformers() throws Exception {
   HttpAction<HttpGet> action = get("/test.two");
   assertEquals(200, action.getResponse().getStatusLine().getStatusCode());
   assertEquals("THIS IS BAR", action.getResponseContent());
 }
示例#2
0
 @Test
 public void testPipelineWithOneTransformer() throws Exception {
   HttpAction<HttpGet> action = get("/test.one");
   assertEquals(200, action.getResponse().getStatusLine().getStatusCode());
   assertEquals("this is bar", action.getResponseContent());
 }
 @Test
 public void testSatisfiedConstraintPreventsRuleExecution() throws Exception {
   HttpAction<HttpGet> action = get("/constraint/ONE/TWO");
   Assert.assertEquals(211, action.getResponse().getStatusLine().getStatusCode());
 }
示例#4
0
 @Test
 public void testResourceParamReadsForNotMatchingCondition() throws Exception {
   HttpAction<HttpGet> action = get("/missing.bah");
   Assert.assertEquals(404, action.getResponse().getStatusLine().getStatusCode());
 }
示例#5
0
 @Test
 public void testResourceParamReadsForMissingParameter() throws Exception {
   HttpAction<HttpGet> action = get("/file.bah");
   Assert.assertEquals(211, action.getResponse().getStatusLine().getStatusCode());
 }
示例#6
0
 @Test
 public void testResourceParamForMatchingCondition() throws Exception {
   HttpAction<HttpGet> action = get("/exists.txt");
   Assert.assertEquals(210, action.getResponse().getStatusLine().getStatusCode());
 }