Skip to content

Conversation

denscollo
Copy link
Contributor

Fixes #4086

Description

This PR migrates all Microsoft.Bot.Builder.AI.Luis tests from MSTest to xUnit.

Specific Changes

  • Replaced MSTest packages with xUnit in the .csproj.
  • Changed [TestMethod] to [Fact].
  • Changed [TestCategory] to [Trait].
  • Changed [ExpectedException] to Assert.ThrowsAsync.
  • Changed Assert.ThrowsException to Assert.Throws.
  • Changed Assert.AreEqual to Assert.Equal.
  • Changed Assert.IsNotNull to Assert.NotNull.
  • Changed Assert.IsNull to Assert.Null.
  • Changed Assert.Fail to throw new XunitException.
  • Added [assembly: TestFramework("Microsoft.Bot.Builder.Startup", "Microsoft.Bot.Builder.AI.Luis.Tests")] to the Startup class to replace [AssemblyInitialize].
  • Implemented LuisAdaptiveRecognizerFixture class to share context among tests.
  • Improved tests Assertions.

Testing

In the following image there are the passing tests.
image

@denscollo denscollo requested a review from a team as a code owner September 8, 2020 19:57
Copy link

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mrivera-ms mrivera-ms merged commit a69996b into microsoft:main Sep 10, 2020
@ceciliaavila ceciliaavila deleted the southworks/update/xunit-migration/ai-luis branch September 11, 2020 12:26
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 botbuilder.ai.luis tests to xunit
4 participants