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

HicServices / RDMP / 7102803153

05 Dec 2023 03:19PM UTC coverage: 56.338% (-0.4%) from 56.745%
7102803153

push

github

web-flow
Bump NUnit from 3.14.0 to 4.0.0 (#1686)

10562 of 20305 branches covered (0.0%)

Branch coverage included in aggregate %.

64 of 96 new or added lines in 21 files covered. (66.67%)

161 existing lines in 17 files now uncovered.

30382 of 52370 relevant lines covered (58.01%)

7337.5 hits per line

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

42.11
/Rdmp.Core/Icons/IconProvision/StateBasedIconProviders/SupportingObjectStateBasedIconProvider.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 Rdmp.Core.Curation.Data;
8
using SixLabors.ImageSharp;
9
using SixLabors.ImageSharp.PixelFormats;
10

11
namespace Rdmp.Core.Icons.IconProvision.StateBasedIconProviders;
12

13
public class SupportingObjectStateBasedIconProvider : IObjectStateBasedIconProvider
14
{
15
    private readonly Image<Rgba32> _supportingDocument;
16
    private readonly Image<Rgba32> _supportingDocumentGlobal;
17
    private readonly Image<Rgba32> _supportingDocumentExtractable;
18
    private readonly Image<Rgba32> _supportingDocumentExtractableGlobal;
19

20
    private readonly Image<Rgba32> _supportingSql;
21
    private readonly Image<Rgba32> _supportingSqlGlobal;
22
    private readonly Image<Rgba32> _supportingSqlExtractable;
23
    private readonly Image<Rgba32> _supportingSqlExtractableGlobal;
24

25
    public SupportingObjectStateBasedIconProvider()
488✔
26
    {
27
        _supportingDocument = Image.Load<Rgba32>(CatalogueIcons.SupportingDocument);
488✔
28
        _supportingDocumentGlobal = Image.Load<Rgba32>(CatalogueIcons.SupportingDocumentGlobal);
488✔
29
        _supportingDocumentExtractable = Image.Load<Rgba32>(CatalogueIcons.SupportingDocumentExtractable);
488✔
30
        _supportingDocumentExtractableGlobal = Image.Load<Rgba32>(CatalogueIcons.SupportingDocumentExtractableGlobal);
488✔
31

32
        _supportingSql = Image.Load<Rgba32>(CatalogueIcons.SupportingSQLTable);
488✔
33
        _supportingSqlGlobal = Image.Load<Rgba32>(CatalogueIcons.SupportingSqlGlobal);
488✔
34
        _supportingSqlExtractable = Image.Load<Rgba32>(CatalogueIcons.SupportingSqlExtractable);
488✔
35
        _supportingSqlExtractableGlobal = Image.Load<Rgba32>(CatalogueIcons.SupportingSqlExtractableGlobal);
488✔
36
    }
488✔
37

38
    public Image<Rgba32> GetImageIfSupportedObject(object o)
39
    {
40
        return o switch
60!
41
        {
60✔
42
            SupportingDocument { Extractable: true } doc => doc.IsGlobal
×
43
                ? _supportingDocumentExtractableGlobal
×
44
                : _supportingDocumentExtractable,
×
UNCOV
45
            SupportingDocument doc => doc.IsGlobal ? _supportingDocumentGlobal : _supportingDocument,
×
46
            SupportingSQLTable { Extractable: true } sql => sql.IsGlobal
×
47
                ? _supportingSqlExtractableGlobal
×
48
                : _supportingSqlExtractable,
×
UNCOV
49
            SupportingSQLTable sql => sql.IsGlobal ? _supportingSqlGlobal : _supportingSql,
×
50
            _ => null
60✔
51
        };
60✔
52
    }
53
}
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