From 853e62216e2f276d811f877f079c55eaeec8c453 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 22 Aug 2017 17:44:08 -0700 Subject: [PATCH] Upgrade to xunit 2.3.0-beta4 Includes a few changes as required by new analyzers added in the upgrade --- build/dependencies.props | 4 ++-- .../ResponseCachingMiddlewareTests.cs | 4 ++-- .../SegmentWriteStreamTests.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 7a9758238c..7dde6b27b6 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -5,7 +5,7 @@ 2.0.0-* 2.0.0-* 2.0.0-* - 15.3.0-* - 2.3.0-beta2-* + 15.3.0 + 2.3.0-beta4-build3742 diff --git a/test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingMiddlewareTests.cs b/test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingMiddlewareTests.cs index 8f7076abe7..831e9ea67e 100644 --- a/test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingMiddlewareTests.cs +++ b/test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingMiddlewareTests.cs @@ -200,7 +200,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests // Verify modifications in the past succeeds context.CachedResponseHeaders[HeaderNames.Date] = HeaderUtilities.FormatDate(utcNow - TimeSpan.FromSeconds(10)); Assert.True(ResponseCachingMiddleware.ContentIsNotModified(context)); - Assert.Equal(1, sink.Writes.Count); + Assert.Single(sink.Writes); // Verify modifications at present succeeds context.CachedResponseHeaders[HeaderNames.Date] = HeaderUtilities.FormatDate(utcNow); @@ -232,7 +232,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests context.CachedResponseHeaders[HeaderNames.Date] = HeaderUtilities.FormatDate(utcNow + TimeSpan.FromSeconds(10)); context.CachedResponseHeaders[HeaderNames.LastModified] = HeaderUtilities.FormatDate(utcNow - TimeSpan.FromSeconds(10)); Assert.True(ResponseCachingMiddleware.ContentIsNotModified(context)); - Assert.Equal(1, sink.Writes.Count); + Assert.Single(sink.Writes); // Verify modifications at present context.CachedResponseHeaders[HeaderNames.Date] = HeaderUtilities.FormatDate(utcNow + TimeSpan.FromSeconds(10)); diff --git a/test/Microsoft.AspNetCore.ResponseCaching.Tests/SegmentWriteStreamTests.cs b/test/Microsoft.AspNetCore.ResponseCaching.Tests/SegmentWriteStreamTests.cs index 203b685b8d..6043128e7b 100644 --- a/test/Microsoft.AspNetCore.ResponseCaching.Tests/SegmentWriteStreamTests.cs +++ b/test/Microsoft.AspNetCore.ResponseCaching.Tests/SegmentWriteStreamTests.cs @@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.ResponseCaching.Tests var stream = new SegmentWriteStream(1); Assert.True(stream.CanWrite); - Assert.Equal(0, stream.GetSegments().Count); + Assert.Empty(stream.GetSegments()); Assert.False(stream.CanWrite); }