Ejemplo n.º 1
0
 public override InputFormat GetValue(HttpContext context)
 {
     try
     {
         return(_repository.inputFormat(context.Request.MediaType));
     }
     catch (MediaTypeNotSupportedException e)
     {
         throw new WebApplicationException(Response.status(Response.Status.UNSUPPORTED_MEDIA_TYPE).entity(e.Message).build());
     }
 }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void canProvideJsonFormat()
        public virtual void CanProvideJsonFormat()
        {
            assertNotNull(_repository.inputFormat(MediaType.valueOf("application/json")));
        }