예제 #1
0
        public void CopyFiles()
        {
            var path = TestingContext.FindParallelDirectory("Storyteller.Samples").AppendPath("Specs");


#if NET46
            var baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
#else
            var baseDirectory = AppContext.BaseDirectory;
#endif

            thePath = baseDirectory.ToFullPath().AppendPath(Guid.NewGuid().ToString());
            var fileSystem = new FileSystem();

            var files = fileSystem.FindFiles(path, FileSet.Deep("*.md"));
            files.Each(file =>
            {
                var relativePath = file.PathRelativeTo(path);
                var destination  = Path.Combine(thePath, relativePath);

                fileSystem.Copy(file, destination);
            });

            theFileWatcher = new NulloSpecFileWatcher();
            Services.Inject <ISpecFileWatcher>(theFileWatcher);

            ClassUnderTest.StartWatching(thePath);
        }
예제 #2
0
        public void can_determine_framework_from_project_file_chooses_only()
        {
            var input = new OpenInput
            {
                PathFlag = TestingContext.FindParallelDirectory("DatabaseSamples")
            };

            input.DetermineFramework().ShouldBe("netcoreapp2.1");
        }
예제 #3
0
        public void can_determine_framework_from_project_file_choose_first()
        {
            var input = new OpenInput
            {
                PathFlag = TestingContext.FindParallelDirectory("Samples")
            };

            input.DetermineFramework().ShouldBe("net46");
        }
예제 #4
0
        public void override_framework_with_flag()
        {
            var input = new OpenInput
            {
                FrameworkFlag = "netcoreapp1.1",
                PathFlag      = TestingContext.FindParallelDirectory("Samples")
            };

            input.DetermineFramework().ShouldBe("netcoreapp1.1");
        }
예제 #5
0
        private Task <SystemRecycled> start(string projectName, string framework = null)
        {
            _project = new Project
            {
                ProjectPath = TestingContext.FindParallelDirectory(projectName)
            };

            if (framework.IsNotEmpty())
            {
                _project.Framework = framework;
            }

            _controller = new EngineController(_project, new ProcessRunnerSystemLauncher(_project));

            return(_controller.Start());
        }