Skip to content
Amadeusz Wieczorek edited this page Jul 16, 2020 · 2 revisions

Transform Shouldly assertions to XUnit assertions

  • regex (\S+)\.ShouldBe\((.+)\);
  • substitution Assert.Equal($2, $1);
  • regex (\S+)\.ShouldBeTrue\(\);
  • substitution Assert.True($1);
  • regex (\S+)\.ShouldBeFalse\(\);
  • substitution Assert.False($1);
  • regex (\S+)\.ShouldBeNull\(\);
  • substitution Assert.Null($1);
  • regex (\S+)\.ShouldNotBeNull\(\);
  • substitution Assert.NotNull($1);
  • regex (\S+)\.ShouldBeEmpty\(\);
  • substitution Assert.Empty($1);
  • regex (\S+)\.ShouldNotBeEmpty\(\);
  • substitution Assert.NotEmpty($1);
Clone this wiki locally