Suppose I have a unit test project UnitTests.dll:
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTests
{
[TestClass]
public class MyTests
{
[TestMethod]
public void TestMethod1()
{
Assert.IsTrue(true);
}
[TestMethod]
public void TestMethod2()
{
Assert.IsTrue(false);
}
}
}
I would like to run the above unit tests programmatically from another project RunUniTests.exe. How do I do that? Something that's similar to NUnit counterpart such as the one shown in How to run NUnit programmatically would be great.