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

LearnLib / learnlib / 6605620268

22 Oct 2023 06:53PM UTC coverage: 93.218% (+0.9%) from 92.296%
6605620268

push

github

mtf90
cleanup passive integration tests

11546 of 12386 relevant lines covered (93.22%)

1.68 hits per line

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

61.54
/drivers/basic/src/main/java/de/learnlib/driver/reflect/Error.java
1
/* Copyright (C) 2013-2023 TU Dortmund
2
 * This file is part of LearnLib, http://www.learnlib.de/.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package de.learnlib.driver.reflect;
17

18
import java.util.Objects;
19

20
import org.checkerframework.checker.nullness.qual.Nullable;
21

22
/**
23
 * A wrapper for representing an exception-based method output via its {@link Class#getSimpleName()}.
24
 */
25
public final class Error extends MethodOutput {
26

27
    private final Throwable cause;
28
    private final String id;
29

30
    public Error(Throwable cause) {
1✔
31
        this.cause = cause;
1✔
32
        this.id = cause.getClass().getSimpleName();
1✔
33
    }
1✔
34

35
    @Override
36
    public int hashCode() {
37
        return Objects.hashCode(this.id);
×
38
    }
39

40
    @Override
41
    public boolean equals(@Nullable Object obj) {
42
        if (this == obj) {
1✔
43
            return true;
×
44
        }
45
        if (!(obj instanceof Error)) {
1✔
46
            return false;
×
47
        }
48

49
        final Error other = (Error) obj;
1✔
50
        return Objects.equals(this.id, other.id);
1✔
51
    }
52

53
    @Override
54
    public String toString() {
55
        return this.id;
×
56
    }
57

58
    public Throwable getCause() {
59
        return cause;
×
60
    }
61
}
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

© 2025 Coveralls, Inc