示例#1
0
        public void OneMethodTest()
        {
            string path = RootPath + @"/TestClasses/ClassLibrary1/bin/Debug/";

            List <TestInfo> infoList = TestLauncher.Launch(path);

            Assert.IsTrue(infoList.Count == 1);

            Assert.IsTrue(infoList[0].Successfull);
        }
示例#2
0
        public void IgnoreTest()
        {
            string path = RootPath + @"/TestClasses/ClassLibrary5/bin/Debug/";

            List <TestInfo> infoList = TestLauncher.Launch(path);

            Assert.IsTrue(infoList.Count == 2);

            foreach (var test in infoList)
            {
                Assert.IsFalse(test.Successfull);
            }
        }
示例#3
0
        public void TwoClassesTest()
        {
            string path = RootPath + @"/TestClasses/ClassLibrary6/bin/Debug/";

            List <TestInfo> infoList = TestLauncher.Launch(path);

            Assert.IsTrue(infoList.Count == 5);

            Assert.AreEqual(typeof(DivideByZeroException), infoList[0].Result);
            Assert.IsFalse(infoList[1].Successfull);
            Assert.IsTrue(infoList[2].isIgnored);
            Assert.IsTrue(infoList[3].Successfull);
            Assert.IsTrue(infoList[4].Successfull);
        }
示例#4
0
 public void DirectoryNotFoundTest()
 {
     Assert.ThrowsException <DirectoryNotFoundException>(() => TestLauncher.Launch("wrongpath"));
 }
示例#5
0
 public void ArgumentNullTest()
 {
     Assert.ThrowsException <ArgumentNullException>(() => TestLauncher.Launch(null));
 }