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

HicServices / RDMP / 9757025998

02 Jul 2024 07:49AM UTC coverage: 56.677% (-0.2%) from 56.914%
9757025998

Pull #1867

github

JFriel
remove with values
Pull Request #1867: Release/8.2.0

10911 of 20750 branches covered (52.58%)

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%)

7844.83 hits per line

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

94.74
/Rdmp.Core/Setting/Setting.cs
1
// Copyright (c) The University of Dundee 2024-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/>.using Amazon.Auth.AccessControlPolicy;
6

7
using Rdmp.Core.Curation.Data;
8
using Rdmp.Core.MapsDirectlyToDatabaseTable.Attributes;
9
using Rdmp.Core.Repositories;
10
using Rdmp.Core.ReusableLibraryCode.Annotations;
11
using System.Collections.Generic;
12
using System.Data.Common;
13

14
namespace Rdmp.Core.Setting;
15

16
/// <inheritdoc cref="ISetting"/>
17

18
public class Setting : DatabaseEntity, ISetting
19
{
20
    #region Database Properties
21

22
    private string _key;
23
    private string _value;
24

25
    [NotNull]
26
    [Unique]
27
    public string Key
28
    {
29
        get => _key;
32✔
30
        set => SetField(ref _key, value);
44✔
31
    }
32

33
    [NotNull]
34
    public string Value
35
    {
36
        get => _value;
32✔
37
        set => SetField(ref _value, value);
46✔
38
    }
39

40
    #endregion
41

NEW
42
    public Setting() { }
×
43
    public Setting(ICatalogueRepository repository, string key, string value)
14✔
44
    {
45
        Key = key;
14✔
46
        Value = value;
14✔
47
        Repository = repository;
14✔
48
        Repository.InsertAndHydrate(this, new Dictionary<string, object>
14✔
49
        {
14✔
50
            { nameof(Key), key },
14✔
51
            { nameof(Value), value },
14✔
52
        });
14✔
53
    }
12✔
54

55
    public Setting(ICatalogueRepository repository, DbDataReader r): base(repository,r)
18✔
56
    {
57
        Key = r["Key"].ToString();
18✔
58
        Value = r["Value"].ToString();
18✔
59
    }
18✔
60
}
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