Skip to content

Conversation

denscollo
Copy link
Contributor

**Note: This PR must be merged after #4590 **

Fixes #4106

Description

This PR migrates all Microsoft.Bot.Streaming.Tests tests from MSTest to xUnit.

Detailed Changes

  • Removed MSTest packages from the .csproj.
  • Replaced [TestMethod] with [Fact].
  • Changed Asserts.
  • Used constants instead of variables where applicable.
  • Used var instead of the specific type.

Also, we did the following changes in:

  • ConcurrentStreamTests:
    • Replaced CollectionAssert.AreEquivalent with Assert.Equal. This was possible because the arrays we compare are ordered.
  • NamedPipeTransportTests:
    • Removed TestContext and replaced it with ITestOutputHelper.
    • Added a constructor to the test class and assigned the _output property.
    • Replaced TestContext.WriteLine with _output.WriteLine.

Testing

The following image shows the tests passing after the changes.
image

@denscollo denscollo requested a review from a team as a code owner September 4, 2020 13:34
@mrivera-ms mrivera-ms merged commit 4016b61 into microsoft:main Sep 10, 2020
@ceciliaavila ceciliaavila deleted the southworks/update/xunit-migration/streaming-tests branch September 11, 2020 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate streaming to xunit

3 participants