Updating to VS 2026
This commit is contained in:
@@ -8,6 +8,8 @@ namespace AMWD.Common.Tests.Extensions
|
||||
[TestClass]
|
||||
public class StreamExtensionsTest
|
||||
{
|
||||
public TestContext TestContext { get; set; }
|
||||
|
||||
[TestMethod]
|
||||
public void ShouldReadLineFromStreamSynchronous()
|
||||
{
|
||||
@@ -69,7 +71,7 @@ namespace AMWD.Common.Tests.Extensions
|
||||
var stream = new MemoryStream(buffer);
|
||||
|
||||
// act
|
||||
string line = await stream.ReadLineAsync();
|
||||
string line = await stream.ReadLineAsync(cancellationToken: TestContext.CancellationToken);
|
||||
|
||||
// assert
|
||||
Assert.AreEqual("First Line", line);
|
||||
@@ -85,7 +87,7 @@ namespace AMWD.Common.Tests.Extensions
|
||||
var stream = new MemoryStream(buffer);
|
||||
|
||||
// act
|
||||
string line = await stream.ReadLineAsync();
|
||||
string line = await stream.ReadLineAsync(cancellationToken: TestContext.CancellationToken);
|
||||
|
||||
// assert
|
||||
Assert.AreEqual("Single Line", line);
|
||||
@@ -100,7 +102,7 @@ namespace AMWD.Common.Tests.Extensions
|
||||
var stream = new WriteOnlyStream();
|
||||
|
||||
// act
|
||||
string line = await stream.ReadLineAsync();
|
||||
string line = await stream.ReadLineAsync(cancellationToken: TestContext.CancellationToken);
|
||||
|
||||
// assert
|
||||
Assert.IsNull(line);
|
||||
|
||||
Reference in New Issue
Block a user