Skip to content

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

Description

@AbhitejJohn

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions