diff --git a/Eraware_Dnn_Spa_Ef_Di_Stencil/UnitTests/Controllers/ModuleExceptionFilterAttributeTests.cs b/Eraware_Dnn_Spa_Ef_Di_Stencil/UnitTests/Controllers/ModuleExceptionFilterAttributeTests.cs index 42180959..4cba76fd 100644 --- a/Eraware_Dnn_Spa_Ef_Di_Stencil/UnitTests/Controllers/ModuleExceptionFilterAttributeTests.cs +++ b/Eraware_Dnn_Spa_Ef_Di_Stencil/UnitTests/Controllers/ModuleExceptionFilterAttributeTests.cs @@ -56,7 +56,7 @@ public static void ArgumentException_BadRequest( } [Fact] - public static void SystemException_DoesNotExposeDetails() + public async Task SystemException_DoesNotExposeDetails() { var attribute = new ModuleExceptionFilterAttribute(); var loggerSource = new Mock(); @@ -72,7 +72,8 @@ public static void SystemException_DoesNotExposeDetails() attribute.OnException(actionExecutedContext); Assert.Equal(HttpStatusCode.InternalServerError, actionExecutedContext.Response.StatusCode); - Assert.NotEqual("Danger", actionExecutedContext.Response.Content.ReadAsStringAsync().Result); + var response = await actionExecutedContext.Response.Content.ReadAsStringAsync(); + Assert.NotEqual("Danger", response); } public static IEnumerable GetExceptionsTestData()