From b761e7d8c214e8d8689477eae8db6b3ea554ad92 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 16 Mar 2015 17:47:29 -0700 Subject: [PATCH] Fix tests to check results for null --- .../AuthenticationTests.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.AspNet.Server.WebListener.FunctionalTests/AuthenticationTests.cs b/test/Microsoft.AspNet.Server.WebListener.FunctionalTests/AuthenticationTests.cs index e78cb247be..451e9387af 100644 --- a/test/Microsoft.AspNet.Server.WebListener.FunctionalTests/AuthenticationTests.cs +++ b/test/Microsoft.AspNet.Server.WebListener.FunctionalTests/AuthenticationTests.cs @@ -16,6 +16,7 @@ // permissions and limitations under the License. using System; +using System.Diagnostics; using System.Linq; using System.Net; using System.Net.Http; @@ -265,7 +266,7 @@ namespace Microsoft.AspNet.Server.WebListener foreach (var scheme in authTypeList) { var authResults = context.Authenticate(scheme); - Assert.Null(authResults.Principal); + Assert.Null(authResults); } return Task.FromResult(0); })) @@ -296,7 +297,7 @@ namespace Microsoft.AspNet.Server.WebListener foreach (var scheme in authTypeList) { var authResults = context.Authenticate(scheme); - if (authResults.Principal != null) + if (authResults != null) { count++; }