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

b1f6c1c4 / ProfessionalAccounting / 297

19 Feb 2023 04:15AM UTC coverage: 36.498% (+0.5%) from 35.998%
297

push

appveyor

b1f6c1c4
fix coupling bug

9985 of 27358 relevant lines covered (36.5%)

716.47 hits per line

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

80.65
/AccountingServer.Entities/Util/QueryBase.cs
1
/* Copyright (C) 2020-2023 b1f6c1c4
2
 *
3
 * This file is part of ProfessionalAccounting.
4
 *
5
 * ProfessionalAccounting is free software: you can redistribute it and/or
6
 * modify it under the terms of the GNU Affero General Public License as
7
 * published by the Free Software Foundation, version 3.
8
 *
9
 * ProfessionalAccounting is distributed in the hope that it will be useful, but
10
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License
12
 * for more details.
13
 *
14
 * You should have received a copy of the GNU Affero General Public License
15
 * along with ProfessionalAccounting.  If not, see
16
 * <https://www.gnu.org/licenses/>.
17
 */
18

19
using System;
20
using System.Collections.Generic;
21

22
namespace AccountingServer.Entities.Util;
23

24
public sealed class DetailQueryUnconstrained : IDetailQueryAtom
25
{
26
    private DetailQueryUnconstrained() { }
1✔
27
    public static IDetailQueryAtom Instance { get; } = new DetailQueryUnconstrained();
1✔
28

29
    public TitleKind? Kind => null;
891✔
30

31
    public VoucherDetail Filter { get; } = new();
1✔
32

33
    public bool IsFundBidirectional => false;
194✔
34

35
    public int Dir => 0;
891✔
36

37
    public string ContentPrefix => null;
893✔
38

39
    public string RemarkPrefix => null;
893✔
40

41
    public bool IsDangerous() => true;
×
42

43
    public T Accept<T>(IQueryVisitor<IDetailQueryAtom, T> visitor) => visitor.Visit(this);
893✔
44
}
45

46
public sealed class VoucherQueryUnconstrained : IVoucherQueryAtom
47
{
48
    private VoucherQueryUnconstrained() { }
1✔
49
    public static IVoucherQueryAtom Instance { get; } = new VoucherQueryUnconstrained();
1✔
50

51
    public bool ForAll => true;
743✔
52

53
    public Voucher VoucherFilter { get; } = new();
1✔
54

55
    public DateFilter Range => DateFilter.Unconstrained;
744✔
56

57
    public IQueryCompounded<IDetailQueryAtom> DetailFilter => DetailQueryUnconstrained.Instance;
892✔
58

59
    public bool IsDangerous() => true;
×
60

61
    public T Accept<T>(IQueryVisitor<IVoucherQueryAtom, T> visitor) => visitor.Visit(this);
744✔
62
}
63

64
public sealed class DistributedQueryUnconstrained : IDistributedQueryAtom
65
{
66
    private DistributedQueryUnconstrained() { }
1✔
67
    public static IDistributedQueryAtom Instance { get; } = new DistributedQueryUnconstrained();
1✔
68

69
    public IDistributed Filter { get; } = new TheFilter();
1✔
70

71
    public DateFilter Range => DateFilter.Unconstrained;
195✔
72

73
    public bool IsDangerous() => true;
×
74

75
    public T Accept<T>(IQueryVisitor<IDistributedQueryAtom, T> visitor) => visitor.Visit(this);
195✔
76

77
    private sealed class TheFilter : IDistributed
78
    {
79
        public Guid? ID => null;
195✔
80

81
        public string User => null;
388✔
82

83
        public string Name => null;
195✔
84

85
        public DateTime? Date => null;
×
86

87
        public double? Value => null;
×
88

89
        public string Remark => null;
195✔
90

91
        public IEnumerable<IDistributedItem> TheSchedule => null;
×
92
    }
93
}
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