matkoch / resharper-fluentassertions

MIT License
13 stars 2 forks source link

Fix Enum type migrations #21

Open inyutin-maxim opened 2 years ago

inyutin-maxim commented 2 years ago

Now for cases where testable value is enum or nullable enum type replace code:

 [Test]
    public void Test()
    {
        // arrange

        // act
        TempEnum result = TempEnum.None;

        // assert
        {caret}Assert.AreEqual(TempEnum.None, result,);
    }

on code

 [Test]
    public void Test()
    {
        // arrange

        // act
        TempEnum result = TempEnum.None;

        // assert
        {caret}AssertionExtensions.Should(result).Be(TempEnum.None);
    }

But should replace on

 [Test]
    public void Test()
    {
        // arrange

        // act
        TempEnum result = TempEnum.None;

        // assert
        {caret}result.Should().Be(TempEnum.None);
    }