• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HicServices / RDMP / 11457925069

pending completion
11457925069

push

github

JFriel
Merge branch 'develop' of https://github.com/HicServices/RDMP

11207 of 21044 branches covered (53.26%)

Branch coverage included in aggregate %.

25 of 51 new or added lines in 3 files covered. (49.02%)

705 existing lines in 27 files now uncovered.

31728 of 53779 relevant lines covered (59.0%)

4115.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.3
/Rdmp.Core/DataLoad/Engine/Checks/Checkers/ProcessTaskChecks.cs
1
// Copyright (c) The University of Dundee 2018-2024
2
// This file is part of the Research Data Management Platform (RDMP).
3
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.
6

7
using System;
8
using System.Linq;
9
using Rdmp.Core.CommandExecution;
10
using Rdmp.Core.Curation.Data.DataLoad;
11
using Rdmp.Core.DataLoad.Engine.DatabaseManagement.EntityNaming;
12
using Rdmp.Core.DataLoad.Engine.LoadExecution.Components.Arguments;
13
using Rdmp.Core.DataLoad.Engine.LoadExecution.Components.Runtime;
14
using Rdmp.Core.ReusableLibraryCode.Checks;
15

16
namespace Rdmp.Core.DataLoad.Engine.Checks.Checkers;
17

18
/// <summary>
19
/// Checks all ProcessTasks that the user has configured for a given data load (See LoadMetadata).  This involves both constructing and initializing
20
/// the instances (which can fail if Type names don't resolve etc) and calling check on the instantiated ProcessTask.
21
/// </summary>
22
public class ProcessTaskChecks : ICheckable
23
{
24
    private readonly ILoadMetadata _loadMetadata;
25
    private LoadArgsDictionary dictionary;
26
    private readonly IBasicActivateItems _activator;
27

28
    public ProcessTaskChecks(ILoadMetadata loadMetadata, IBasicActivateItems activator)
108✔
29
    {
30
        _loadMetadata = loadMetadata;
108✔
31
        _activator = activator;
108✔
32
    }
108✔
33

34
    public void Check(ProcessTask processTask, ICheckNotifier notifier)
35
    {
36
        if (dictionary == null)
114✔
37
            try
38
            {
39
                dictionary =
108✔
40
                    new LoadArgsDictionary(_loadMetadata, new HICDatabaseConfiguration(_loadMetadata).DeployInfo);
108✔
41
            }
106✔
42
            catch (Exception e)
2✔
43
            {
44
                notifier.OnCheckPerformed(
2✔
45
                    new CheckEventArgs("Could not assemble LoadArgsDictionary, see inner exception for specifics",
2✔
46
                        CheckResult.Fail, e));
2✔
UNCOV
47
                return;
×
48
            }
49

50

51
        var created = RuntimeTaskFactory.Create(processTask, dictionary.LoadArgs[processTask.LoadStage]);
112✔
52
        if (created is DataProviderRuntimeTask)
98✔
53
            ((DataProviderRuntimeTask)created).SetActivator(_activator);
4✔
54
        created.Check(notifier);
98✔
55
    }
78✔
56

57
    public void Check(ICheckNotifier notifier)
58
    {
59
        foreach (ProcessTask processTask in _loadMetadata.ProcessTasks.Where(pt => !pt.IsDisabled))
522✔
60
            Check(processTask, notifier);
114✔
61
    }
72✔
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc