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

leeonky / test-charm-java / 347

07 Oct 2025 09:20AM UTC coverage: 74.946% (+0.2%) from 74.7%
347

push

circleci

leeonky
raise error when dependent value changed

23 of 23 new or added lines in 3 files covered. (100.0%)

20 existing lines in 6 files now uncovered.

8723 of 11639 relevant lines covered (74.95%)

0.75 hits per line

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

75.0
/jfactory/src/main/java/com/github/leeonky/jfactory/ListConsistencyBuilder.java
1
package com.github.leeonky.jfactory;
2

3
import java.util.function.Consumer;
4
import java.util.function.Function;
5

6
import static com.github.leeonky.util.BeanClass.create;
7

8
public class ListConsistencyBuilder<T, C extends Coordinate> {
9
    protected final Consistency<T, C> main;
10
    final DefaultListConsistency<T, C> listConsistency;
11

12
    ListConsistencyBuilder(Consistency<T, C> main, DefaultListConsistency<T, C> listConsistency) {
1✔
13
        this.main = main;
1✔
14
        this.listConsistency = listConsistency;
1✔
15
    }
1✔
16

17
    public Consistency<T, C> consistent(Consumer<ListConsistency<T, C>> definition) {
18
        definition.accept(listConsistency);
1✔
19
        return main;
1✔
20
    }
21

22
    public ListConsistencyBuilder<T, C> normalize(Normalizer<C> normalizer) {
23
        listConsistency.normalize(normalizer::align, normalizer::deAlign);
1✔
24
        return this;
1✔
25
    }
26

27

28
    public static class D1<T, C extends Coordinate> extends ListConsistencyBuilder<T, C> {
29
        D1(Consistency<T, C> main, DefaultListConsistency<T, C> listConsistency) {
30
            super(main, listConsistency);
1✔
31
        }
1✔
32

33
        public D1<T, C> normalize(Function<Coordinate.D1, C> aligner,
34
                                  Function<C, Coordinate.D1> inverseAligner) {
35
            listConsistency.normalize(c -> aligner.apply(c.convertTo(create(Coordinate.D1.class))),
1✔
36
                    inverseAligner::apply);
37
            return this;
1✔
38

39
        }
40
    }
41

42
    public static class D2<T, C extends Coordinate> extends ListConsistencyBuilder<T, C> {
43
        D2(Consistency<T, C> main, DefaultListConsistency<T, C> listConsistency) {
UNCOV
44
            super(main, listConsistency);
×
UNCOV
45
        }
×
46

47
        public D2<T, C> normalize(Function<Coordinate.D2, C> aligner,
48
                                  Function<C, Coordinate.D2> inverseAligner) {
UNCOV
49
            listConsistency.normalize(c -> aligner.apply(c.convertTo(create(Coordinate.D2.class))),
×
50
                    inverseAligner::apply);
UNCOV
51
            return this;
×
52
        }
53
    }
54
}
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