public void InitializeAllFrameworks() {
            //Arrange and Act
            string[] frameworkDirectories = new string[] {
                "c:\\nodejstools\\" + TestFrameworkDirectories.ExportRunnerFramework,
                "c:\\nodejstools\\" + "mocha"
             };
            FrameworkDiscover discover = new FrameworkDiscover(frameworkDirectories);

            //Assert
            TestFramework defaultOne = discover.Get(TestFrameworkDirectories.ExportRunnerFramework);
            Assert.IsNotNull(defaultOne);
            TestFramework mocha = discover.Get("moCHA");//searching on name is case insensitive
            Assert.IsNotNull(mocha);
            TestFramework nonSenseOne = discover.Get("NonSense");
            Assert.IsNull(nonSenseOne);
        }
        public void DefaultFramework_HasCorrectFolderInformation() {
            //Arrange
            string testName = "dummyUT";
            string testFile = "dummyTestFile.js";
            string vsixInstallFolder = "c:\\dummyFolder";
            string workingFolder = "c:\\DummyNodejsProject";
            string framework = TestFrameworkDirectories.ExportRunnerFramework;
            string testFrameworkDirectory = vsixInstallFolder + "\\" + framework;
            FrameworkDiscover discover = new FrameworkDiscover(new string[] { testFrameworkDirectory });

            //Act
            TestFramework defaultOne = discover.Get(TestFrameworkDirectories.ExportRunnerFramework);
            string[] args = defaultOne.ArgumentsToRunTests(testName, testFile, workingFolder, workingFolder);

            //Assert
            Assert.AreEqual("\"" + vsixInstallFolder + "\\run_tests.js" + "\"", args[0]);
            Assert.AreEqual(framework, args[1]);
            Assert.AreEqual("\"" + testName + "\"", args[2]);
            Assert.AreEqual("\"" + testFile + "\"", args[3]);
            Assert.AreEqual("\"" + workingFolder + "\"", args[4]);
        }
Beispiel #3
0
 private TestFrameworks.TestFramework GetTestFrameworkObject(string testFramework) {
     TestFrameworks.FrameworkDiscover discover = new TestFrameworks.FrameworkDiscover();
     return discover.Get(testFramework);
 }
Beispiel #4
0
        private TestFrameworks.TestFramework GetTestFrameworkObject(string testFramework)
        {
            var discover = new TestFrameworks.FrameworkDiscover();

            return(discover.Get(testFramework));
        }
Beispiel #5
0
 private IEnumerable<string> GetInterpreterArgs(TestCase test, string workingDir, string projectRootDir) {
     TestFrameworks.NodejsTestInfo testInfo = new TestFrameworks.NodejsTestInfo(test.FullyQualifiedName);
     TestFrameworks.FrameworkDiscover discover = new TestFrameworks.FrameworkDiscover();
     return discover.Get(testInfo.TestFramework).ArgumentsToRunTests(testInfo.TestName, testInfo.ModulePath, workingDir, projectRootDir);
 }
Beispiel #6
0
 private IEnumerable <string> GetInterpreterArgs(TestCase test, string workingDir, string projectRootDir)
 {
     TestFrameworks.NodejsTestInfo    testInfo = new TestFrameworks.NodejsTestInfo(test.FullyQualifiedName);
     TestFrameworks.FrameworkDiscover discover = new TestFrameworks.FrameworkDiscover();
     return(discover.Get(testInfo.TestFramework).ArgumentsToRunTests(testInfo.TestName, testInfo.ModulePath, workingDir, projectRootDir));
 }