Minor changes to test code to resolve xUnit2013 build errors

This commit is contained in:
Nate McMaster 2017-10-05 15:16:06 -07:00
parent 2f8951e244
commit 6b3d42f6bd
4 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
@ -52,7 +52,7 @@ namespace Microsoft.AspNetCore.Dispatcher
await selector.SelectAsync(context);
// Assert
Assert.Equal(0, context.Endpoints.Count);
Assert.Empty(context.Endpoints);
}
[Theory]

View File

@ -42,7 +42,7 @@ namespace Microsoft.AspNetCore.Routing
Assert.Equal(path, pathData.VirtualPath);
Assert.NotNull(pathData.DataTokens);
Assert.Equal("TestValue", pathData.DataTokens["TestKey"]);
Assert.Equal(1, pathData.DataTokens.Count);
Assert.Single(pathData.DataTokens);
Assert.NotSame(dataTokens, pathData.DataTokens);
}

View File

@ -408,7 +408,7 @@ namespace Microsoft.AspNetCore.Routing
// Assert
Assert.NotNull(context.Handler);
Assert.Equal(0, context.RouteData.Values.Count);
Assert.Empty(context.RouteData.Values);
}
[Fact]

View File

@ -931,7 +931,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
// Assert
Assert.True(match);
Assert.Equal(1, values.Count);
Assert.Single(values);
Assert.Equal("Home", values["controller"]);
Assert.False(values.ContainsKey("action"));
}
@ -950,7 +950,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
// Assert
Assert.True(match);
Assert.Equal(0, values.Count);
Assert.Empty(values);
Assert.False(values.ContainsKey("controller"));
}
@ -968,7 +968,7 @@ namespace Microsoft.AspNetCore.Routing.Template.Tests
// Assert
Assert.True(match);
Assert.Equal(0, values.Count);
Assert.Empty(values);
}
[Fact]