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

HicServices / RDMP / 6671875708

27 Oct 2023 08:20PM UTC coverage: 56.909% (-0.002%) from 56.911%
6671875708

Pull #1659

github

jas88
Fix typos and tidy tooltip cache logic
Pull Request #1659: Feature/cleanup

10694 of 20239 branches covered (0.0%)

Branch coverage included in aggregate %.

24 of 24 new or added lines in 5 files covered. (100.0%)

30536 of 52210 relevant lines covered (58.49%)

7340.21 hits per line

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

73.33
/Rdmp.Core/Providers/Nodes/SingletonNode.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;
8
using Equ;
9

10
namespace Rdmp.Core.Providers.Nodes;
11

12
/// <summary>
13
/// <see cref="Node"/> of which there can only ever be one in the RDMP object hierarchy e.g. <see cref="AllCohortsNode"/>.  By convention
14
/// these classes should normally start with the prefix "All"
15
/// </summary>
16
public abstract class SingletonNode : Node, IEquatable<SingletonNode>
17
{
18
    private readonly string _caption;
19

20
    protected SingletonNode(string caption)
23,328✔
21
    {
22
        _caption = caption;
23,328✔
23
    }
23,328✔
24

25
    public override string ToString() => _caption;
10✔
26

27
    public bool Equals(SingletonNode other) => string.Equals(_caption, other._caption);
×
28

29
    public override bool Equals(object obj) => obj?.GetType() == typeof(SingletonNode) &&
56,870!
30
                                               typeof(SingletonNode) == GetType() &&
56,870✔
31
                                               MemberwiseEqualityComparer<SingletonNode>.ByProperties.Equals(this, obj as SingletonNode);
56,870✔
32

33
    public override int GetHashCode() => _caption.GetHashCode();
87,036✔
34
}
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