Skip to content

Assert.Throws conversion loses expected message #16

@waf

Description

@waf

Given

[Test, ExpectedException(typeof(ArgumentException), ExpectedMessage = "Must be bigger than zero")]
public void Foo()
{
    // method body
}

we convert it to

[Xunit.Fact]
public void Foo()
{
    Assert.Throws<ArgumentException>(() =>
    {
        // method body
    });
}

so we lose the ExpectedMessage assertion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions