We added support to migrate from other testing frameworks.
-
Temporarily install the
aweXpect.Migrationpackage in the test project and add the following global using statements in the test project:global using System.Threading.Tasks; global using aweXpect;
-
Depending on the framework, the assertions will be marked with a warning:
- For FluentAssertions:
All usages of.Should()will be marked withaweXpectM002: fluentassertions should be migrated to aweXpect - For Xunit:
All usages ofAssertwill be marked withaweXpectM003: Xunit assertions should be migrated to aweXpect
- For FluentAssertions:
-
Most warnings can be automatically fixed with a code fix provider. Make sure to await all migrated expectations (fix
aweXpect0001: Expectations must be awaited or verified). -
Fix the remaining warnings manually.
-
Remove the
aweXpect.Migrationpackage again.