Skip to content

An inconclusive in a test initialize fails the test if it has an ExpectedException #136

Closed

Description

Description

If a test is reported inconclusive in its TestInitialize but is adorned with a ExpectedException attribute, it fails.

Steps to reproduce

  1. Create a test project with the following code:
        [TestInitialize]
        public void TestInit()
        {
            Assert.Inconclusive();
        }

        [TestMethod]
        [ExpectedException(typeof(NullReferenceException))]
        public void TestMethod1()
        {
        }
  1. Run the test.

Expected behavior

The test is inconclusive.

Actual behavior

The test fails.

Environment

MSTest.TestFramework: 1.1.14.
MSTest.TestAdapter: 1.1.14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions