Пример #1
0
        public void Init()
        {
            Root = Path.Combine(MockSnapshots.GetShortRoot(), "Powershell");
            Data = new SubmissionData(new StudentSubmissionDto()
            {
                StudentName    = "StudentName",
                ClassName      = "ClassName",
                SnapshotFolder = MockSnapshots.GetCalculatorSnapshots(),
            }, Root);

            Assignment = new Assignment()
            {
                TestProject = new TestProject()
                {
                    Id              = 1,
                    Files           = MockSnapshots.GetCalculatorTestProjectFiles(),
                    TestFolder      = MockSnapshots.GetCalculatorTestProjectFolder(),
                    TestDllFile     = MockSnapshots.GetCalculatorTestProjectDll(),
                    TestProjectFile = MockSnapshots.GetCalculatorTestProjectFile(),
                    UnitTests       = MockSnapshots.GetCalculatorUnitTests(),
                },
                TestProjectId = 1,
            };
            Generator = new PowershellUnitTestGenerator(
                Microsoft.Extensions.Options.Options.Create(
                    new PowershellOptions()
            {
                CommandPath = MockSnapshots.PowershellScript(),
                PassedValue = MockSnapshots.PowershellPassedValue(),
                ResultsFile = "test_results.txt",
            }));
        }