public void AllowedTypesController_MimetypeSyncThumb() { var jsonResult = new AllowedTypesController().AllowedTypesMimetypeSyncThumb() as JsonResult; var allowedApiResult = jsonResult.Value as HashSet <string>; Assert.IsTrue(allowedApiResult.Contains("image/jpeg")); }
public void AllowedTypesController_AllowedTypesThumb_Example() { var jsonResult = new AllowedTypesController { ControllerContext = { HttpContext = _httpContext } }.AllowedTypesThumb("test.jpg") as JsonResult; var allowedApiResult = bool.Parse(jsonResult.Value.ToString()); Assert.IsTrue(allowedApiResult); }
public void AllowedTypesController_AllowedTypesThumb_NoInput() { var jsonResult = new AllowedTypesController { ControllerContext = { HttpContext = _httpContext } }.AllowedTypesThumb("") as JsonResult; var allowedApiResult = bool.Parse(jsonResult.Value.ToString()); Assert.IsFalse(allowedApiResult); }