コード例 #1
0
        public static TestInfo GetConventionInfo(string testAssemblyPath)
        {
            var executingAssembly          = Assembly.GetExecutingAssembly();
            var executingAssemblyDirectory = Path.GetDirectoryName(executingAssembly.Location);

            var previousDirectory = Directory.GetCurrentDirectory();

            Directory.SetCurrentDirectory(executingAssemblyDirectory);

            TestInfo info;

            using (var appDomain = new AppDomainWrapper(executingAssemblyDirectory, "FixieTestFinder"))
            {
                var assemblyName = Assembly.GetExecutingAssembly().FullName;
                var className    = typeof(RemoteTestFinder).FullName;
                var remoteFinder = appDomain.CreateObject <RemoteTestFinder>(
                    assemblyName,
                    className);

                info = remoteFinder.FindTests(testAssemblyPath);
            }

            Directory.SetCurrentDirectory(previousDirectory);
            return(info);
        }
コード例 #2
0
        public static string[] LoadTestNames(AppDomainWrapper appDomainWrapper, string dllPath)
        {
            var o = appDomainWrapper.CreateObject <Marshalled.Executor.SpecEnumerator>("NJasmine.dll");

            var result = o.GetTestNames(AssemblyName.GetAssemblyName(dllPath).FullName);

            return(result);
        }
コード例 #3
0
        public static string[] LoadTestNames(AppDomainWrapper appDomainWrapper, string dllPath)
        {
            var o = appDomainWrapper.CreateObject<Marshalled.Executor.SpecEnumerator>("NJasmine.dll");

            var result = o.GetTestNames(AssemblyName.GetAssemblyName(dllPath).FullName);

            return result;
        }
コード例 #4
0
        public static TestInfo GetConventionInfo(string testAssemblyPath)
        {
            var executingAssembly = Assembly.GetExecutingAssembly();
            var executingAssemblyDirectory = Path.GetDirectoryName(executingAssembly.Location);

            var previousDirectory = Directory.GetCurrentDirectory();
            Directory.SetCurrentDirectory(executingAssemblyDirectory);

            TestInfo info;

            using (var appDomain = new AppDomainWrapper(executingAssemblyDirectory, "FixieTestFinder"))
            {
                var assemblyName = Assembly.GetExecutingAssembly().FullName;
                var className = typeof(RemoteTestFinder).FullName;
                var remoteFinder = appDomain.CreateObject<RemoteTestFinder>(
                    assemblyName,
                    className);

                info = remoteFinder.FindTests(testAssemblyPath);
            }

            Directory.SetCurrentDirectory(previousDirectory);
            return info;
        }
コード例 #5
0
        public static void RunTests(string dllPath, AppDomainWrapper appDomainWrapper, string[] testNames, string explictlyIncluding, ITestResultListener sink)
        {
            var o = appDomainWrapper.CreateObject <Marshalled.Executor.SpecRunner>("NJasmine.dll");

            o.RunTests(AssemblyName.GetAssemblyName(dllPath).FullName, testNames, explictlyIncluding, sink);
        }
コード例 #6
0
        public static void RunTests(string dllPath, AppDomainWrapper appDomainWrapper, string[] testNames, string explictlyIncluding, ITestResultListener sink)
        {
            var o = appDomainWrapper.CreateObject<Marshalled.Executor.SpecRunner>("NJasmine.dll");

            o.RunTests(AssemblyName.GetAssemblyName(dllPath).FullName, testNames, explictlyIncluding, sink);
        }