Kostas Konstantinidis
Kostas Konstantinidis

Reputation: 13707

Mbunit - Gallio. Get name of the currently executing test

Is there a way to get the name of the currently executing test from ie the Setup method of a test fixture?

Upvotes: 0

Views: 655

Answers (1)

grahamrhay
grahamrhay

Reputation: 2166

Have a look at the TestContext:

    [Test]
    public void Pass()
    {
        Console.WriteLine("Test name: {0}", TestContext.CurrentContext.Test.FullName);
    }

Upvotes: 1

Related Questions