Second Unit Test Not Running

Posted by TomJ on Stack Overflow See other posts from Stack Overflow or by TomJ
Published on 2012-03-30T17:17:38Z Indexed on 2012/03/30 17:28 UTC
Read the original article Hit count: 207

Filed under:
|

I am having trouble getting my Method B test to run. The logic is fine, but when the unit tests are run, only Method A will run. If Method A and B are switched in terms of spots, only Method B will run. So clearly the code is wrong at some point. Do I need to call method B's test from inside method A in order to get both unit tests to run?

I'm pretty new to C#, so forgive my basic question.

using redacted;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace UnitTests
{
    [TestClass()]
    public class ClassTest
    {
        public TestContext TestContext{get;set;}

        [TestMethod()]
        public void MethodATest()
        {
            the unit test
        }

        [TestMethod()]
        public void MethodBTest()
        {
            the unit test
        }
    }
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about unit-testing