1
0

Updating to VS 2026

This commit is contained in:
2025-11-13 20:30:44 +01:00
parent 1096186c40
commit 1767b55c8a
29 changed files with 230 additions and 277 deletions

View File

@@ -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);