<commit_before>﻿using System;
using System.Collections.Generic;
using FlubuCore.Context;
using FlubuCore.Context.FluentInterface.Interfaces;
using FlubuCore.Scripting;
using FlubuCore.Tasks.Process;
using Moq;

namespace FlubuCore.Tests.Tasks
{
    public abstract class TaskUnitTestBase
    {
        protected TaskUnitTestBase(MockBehavior propertiesMockBehavior = MockBehavior.Strict)
        {
            Tasks = new Mock<ITaskFluentInterface>();
            CoreTasks = new Mock<ICoreTaskFluentInterface>();
            Context = new Mock<ITaskContextInternal>();
            CommandArguments = new Mock<CommandArguments>();
            Properties = new Mock<IBuildPropertiesSession>(propertiesMockBehavior);
            Context.Setup(x => x.Properties).Returns(Properties.Object);
            Context.Setup(x => x.Tasks()).Returns(Tasks.Object);
            Context.Setup(x => x.CoreTasks()).Returns(CoreTasks.Object);
            Context.Setup(x => x.Args).Returns(CommandArguments.Object);

            RunProgramTask = new Mock<IRunProgramTask>();
            RunProgramTask.Setup(x => x.WithArguments(It.IsAny<string>(), false)).Returns(RunProgramTask.Object);
            RunProgramTask.Setup(x => x.WithArguments(It.IsAny<string[]>())).Returns(RunProgramTask.Object);
            RunProgramTask.Setup(x => x.WorkingFolder(It.IsAny<string>())).Returns(RunProgramTask.Object);
            RunProgramTask.Setup(x => x.CaptureErrorOutput()).Returns(RunProgramTask.Object);
            RunProgramTask.Setup(x => x.CaptureOutput()).Returns(RunProgramTask.Object);<commit_msg>fixes tests.<commit_after>﻿using System;
using System.Collections.Generic;
using FlubuCore.Context;
using FlubuCore.Context.FluentInterface.Interfaces;
using FlubuCore.Infrastructure;
using FlubuCore.Scripting;
using FlubuCore.Tasks.Process;
using Moq;

namespace FlubuCore.Tests.Tasks
{
    public abstract class TaskUnitTestBase
    {
        protected TaskUnitTestBase(MockBehavior propertiesMockBehavior = MockBehavior.Strict)
        {
            Tasks = new Mock<ITaskFluentInterface>();
            CoreTasks = new Mock<ICoreTaskFluentInterface>();
            Context = new Mock<ITaskContextInternal>();
            CommandArguments = new Mock<CommandArguments>();
            Properties = new Mock<IBuildPropertiesSession>(propertiesMockBehavior);
            Context.Setup(x => x.Properties).Returns(Properties.Object);
            Context.Setup(x => x.Tasks()).Returns(Tasks.Object);
            Context.Setup(x => x.CoreTasks()).Returns(CoreTasks.Object);
            Context.Setup(x => x.Args).Returns(CommandArguments.Object);
            Context.Setup(x => x.ScriptArgs).Returns(new DictionaryWithDefault<string, string>());

            RunProgramTask = new Mock<IRunProgramTask>();
            RunProgramTask.Setup(x => x.WithArguments(It.IsAny<string>(), false)).Returns(RunProgramTask.Object);
            RunProgramTask.Setup(x => x.WithArguments(It.IsAny<string[]>())).Returns(RunProgramTask.Object);
            RunProgramTask.Setup(x => x.WorkingFolder(It.IsAny<string>())).Returns(RunProgramTask.Object);
            RunProgramTask.Setup(x => x.CaptureErrorOutput()).Returns(RunProgramTask.Object);
            RunProgramTask.Setup(x => x.CaptureOutput()).Returns(RunProgramTask.Object);
{'fraction_non_alphanumeric': 0.12446873102610807, 'fraction_numerical': 0.0, 'mean_word_length': 3.7206303724928365, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2131451', 'n_tokens_mistral': 884, 'n_tokens_neox': 873, 'n_words': 128}