コード例 #1
0
        private ProcessArgumentBuilder GetArguments(
            FilePath coverageFile,
            FilePath testProject,
            CoverletSettings settings)
        {
            var argumentBuilder = new ProcessArgumentBuilder();

            argumentBuilder.AppendQuoted(coverageFile.MakeAbsolute(_environment).FullPath);

            argumentBuilder.AppendSwitchQuoted("--target", "dotnet");
            argumentBuilder.AppendSwitchQuoted($"--targetargs", $"test {testProject.MakeAbsolute(_environment)} --no-build");

            ArgumentsProcessor.ProcessToolArguments(settings, _environment, argumentBuilder, testProject);

            return(argumentBuilder);
        }
コード例 #2
0
        public static void DotNetCoreTest(
            this ICakeContext context,
            FilePath project,
            DotNetCoreTestSettings settings,
            CoverletSettings coverletSettings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            var currentCustomization = settings.ArgumentCustomization;

            settings.ArgumentCustomization = (args) => ArgumentsProcessor.ProcessMSBuildArguments(
                coverletSettings,
                context.Environment,
                currentCustomization?.Invoke(args) ?? args,
                project);

            context.DotNetCoreTest(project.FullPath, settings);
        }