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

HicServices / RDMP / 9757494962

02 Jul 2024 08:23AM UTC coverage: 56.679% (-0.2%) from 56.914%
9757494962

Pull #1867

github

web-flow
Merge branch 'develop' into release/8.2.0
Pull Request #1867: Release/8.2.0

10912 of 20750 branches covered (52.59%)

Branch coverage included in aggregate %.

369 of 831 new or added lines in 38 files covered. (44.4%)

375 existing lines in 25 files now uncovered.

30965 of 53135 relevant lines covered (58.28%)

7847.68 hits per line

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

37.93
/Rdmp.Core/Providers/Nodes/LoadMetadataNodes/LoadDirectoryNode.cs
1
// Copyright (c) The University of Dundee 2018-2019
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.IO;
8
using Rdmp.Core.Curation.Data.Cohort;
9
using Rdmp.Core.Curation.Data.DataLoad;
10

11
namespace Rdmp.Core.Providers.Nodes.LoadMetadataNodes;
12

13
public class LoadDirectoryNode : Node, IDirectoryInfoNode, IOrderable
14
{
15
    public LoadMetadata LoadMetadata { get; }
880✔
16

17
    public LoadDirectoryNode(LoadMetadata loadMetadata)
220✔
18
    {
19
        LoadMetadata = loadMetadata;
220✔
20
    }
220✔
21

NEW
22
    public bool IsEmpty => string.IsNullOrWhiteSpace(LoadMetadata.LocationOfForLoadingDirectory);
×
23

24

25
    public override string ToString()
26
    {
NEW
27
        var directory = LoadMetadata.GetRootDirectory();
×
NEW
28
        if (directory == null)
×
29
        {
NEW
30
            if (LoadMetadata.LocationOfForLoadingDirectory == null) return "No Load Metadata Set";
×
NEW
31
            return "Custom";
×
32
        }
NEW
33
        return directory.ToString();
×
34
    }
35

NEW
36
    public DirectoryInfo GetDirectoryInfoIfAny() => LoadMetadata.GetRootDirectory();
×
37

38
    protected bool Equals(LoadDirectoryNode other) => Equals(LoadMetadata, other.LoadMetadata);
×
39

40
    public override bool Equals(object obj)
41
    {
42
        if (obj is null) return false;
454!
43
        if (ReferenceEquals(this, obj)) return true;
454!
44
        if (obj.GetType() != GetType()) return false;
908!
45
        return Equals((LoadDirectoryNode)obj);
×
46
    }
47

48
    public override int GetHashCode() => System.HashCode.Combine(LoadMetadata);
880✔
49

50
    public int Order
51
    {
52
        get => 3;
×
53
        set { }
×
54
    }
55
}
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