コード例 #1
0
 @Test
 public void writesTheCorrectContent() throws IOException {
   final FileResponder responder =
       new FileResponder("/org/netmelody/cieye/server/response/responder/test/bob.js");
   assertThat(IOUtils.toString(responder.respond(null).inputStream()), is("//hi"));
 }
コード例 #2
0
 @Test
 public void suppliesTheCorrectMimeType() throws IOException {
   final FileResponder responder =
       new FileResponder("/org/netmelody/cieye/server/response/responder/test/bob.js");
   assertThat(responder.respond(null).contentType, is("text/javascript; charset=utf-8"));
 }