Esempio n. 1
0
        public static void GenerateAll(
            [Required(Description = "Visual Studio Project File containing features")] string projectFile,
            [Optional(false, "force", "f")] bool forceGeneration,
            [Optional(false, "verbose", "v")] bool verboseOutput)
        {
            SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(projectFile);
            ITraceListener  traceListener   = verboseOutput ? (ITraceListener) new TextWriterTraceListener(Console.Out) : new NullListener();
            var             batchGenerator  = new BatchGenerator(traceListener, new TestGeneratorFactory());

            batchGenerator.ProcessProject(specFlowProject, forceGeneration);
        }
Esempio n. 2
0
        public static void GenerateAll(GenerateAllOptions parameters)
        {
            if (parameters.RequestDebuggerToAttach)
            {
                Debugger.Launch();
            }

            ITraceListener traceListener = parameters.VerboseOutput ? (ITraceListener) new TextWriterTraceListener(Console.Out) : new NullListener();

            SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(Path.GetFullPath(parameters.ProjectFile));
            var             batchGenerator  = new BatchGenerator(traceListener, new TestGeneratorFactory());

            batchGenerator.OnError += BatchGenerator_OnError;

            batchGenerator.ProcessProject(specFlowProject, parameters.ForceGeneration);
        }
Esempio n. 3
0
        public static void GenerateAll(
            [Required(Description = "Visual Studio Project File containing features")] string projectFile,
            [Optional(false, "force", "f")] bool forceGeneration,
            [Optional(false, "verbose", "v")] bool verboseOutput,
            [Optional(false, "debug", Description = "Used for tool integration")] bool requestDebuggerToAttach)
        {
            if (requestDebuggerToAttach)
            {
                Debugger.Launch();
            }

            SpecFlowProject specFlowProject = MsBuildProjectReader.LoadSpecFlowProjectFromMsBuild(Path.GetFullPath(projectFile));
            ITraceListener  traceListener   = verboseOutput ? (ITraceListener) new TextWriterTraceListener(Console.Out) : new NullListener();
            var             batchGenerator  = new BatchGenerator(traceListener, new TestGeneratorFactory());

            batchGenerator.OnError += batchGenerator_OnError;

            batchGenerator.ProcessProject(specFlowProject, forceGeneration);
        }