Fix tests to check results for null

This commit is contained in:
Hao Kung 2015-03-16 17:47:29 -07:00
parent efc5ea9b5d
commit b761e7d8c2
1 changed files with 3 additions and 2 deletions

View File

@ -16,6 +16,7 @@
// permissions and limitations under the License. // permissions and limitations under the License.
using System; using System;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
@ -265,7 +266,7 @@ namespace Microsoft.AspNet.Server.WebListener
foreach (var scheme in authTypeList) foreach (var scheme in authTypeList)
{ {
var authResults = context.Authenticate(scheme); var authResults = context.Authenticate(scheme);
Assert.Null(authResults.Principal); Assert.Null(authResults);
} }
return Task.FromResult(0); return Task.FromResult(0);
})) }))
@ -296,7 +297,7 @@ namespace Microsoft.AspNet.Server.WebListener
foreach (var scheme in authTypeList) foreach (var scheme in authTypeList)
{ {
var authResults = context.Authenticate(scheme); var authResults = context.Authenticate(scheme);
if (authResults.Principal != null) if (authResults != null)
{ {
count++; count++;
} }