forked from assertj/assertj-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbstractAnnotatedClassAssert.expected.txt
More file actions
112 lines (92 loc) · 4.6 KB
/
AbstractAnnotatedClassAssert.expected.txt
File metadata and controls
112 lines (92 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package org.assertj.assertions.generator.data;
import java.util.Objects;
import org.assertj.core.api.AbstractObjectAssert;
/**
* Abstract base class for {@link AnnotatedClass} specific assertions - Generated by CustomAssertionGenerator.
*/
@javax.annotation.Generated(value="assertj-assertions-generator")
public abstract class AbstractAnnotatedClassAssert<S extends AbstractAnnotatedClassAssert<S, A>, A extends AnnotatedClass> extends AbstractObjectAssert<S, A> {
/**
* Creates a new <code>{@link AbstractAnnotatedClassAssert}</code> to make assertions on actual AnnotatedClass.
* @param actual the AnnotatedClass we want to make assertions on.
*/
protected AbstractAnnotatedClassAssert(A actual, Class<S> selfType) {
super(actual, selfType);
}
/**
* Verifies that the actual AnnotatedClass's anotherProperty is equal to the given one.
* @param anotherProperty the given anotherProperty to compare the actual AnnotatedClass's anotherProperty to.
* @return this assertion object.
* @throws AssertionError - if the actual AnnotatedClass's anotherProperty is not equal to the given one.
*/
public S hasAnotherProperty(Object anotherProperty) {
// check that actual AnnotatedClass we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting anotherProperty of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// null safe check
Object actualAnotherProperty = actual.anotherProperty();
if (!Objects.deepEquals(actualAnotherProperty, anotherProperty)) {
failWithMessage(assertjErrorMessage, actual, anotherProperty, actualAnotherProperty);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual AnnotatedClass's stuff is equal to the given one.
* @param stuff the given stuff to compare the actual AnnotatedClass's stuff to.
* @return this assertion object.
* @throws AssertionError - if the actual AnnotatedClass's stuff is not equal to the given one.
*/
public S hasStuff(boolean stuff) {
// check that actual AnnotatedClass we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting stuff of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// check
boolean actualStuff = actual.getStuff();
if (actualStuff != stuff) {
failWithMessage(assertjErrorMessage, actual, stuff, actualStuff);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual AnnotatedClass's thisIsAProperty is equal to the given one.
* @param thisIsAProperty the given thisIsAProperty to compare the actual AnnotatedClass's thisIsAProperty to.
* @return this assertion object.
* @throws AssertionError - if the actual AnnotatedClass's thisIsAProperty is not equal to the given one.
*/
public S hasThisIsAProperty(boolean thisIsAProperty) {
// check that actual AnnotatedClass we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting thisIsAProperty of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// check
boolean actualThisIsAProperty = actual.thisIsAProperty();
if (actualThisIsAProperty != thisIsAProperty) {
failWithMessage(assertjErrorMessage, actual, thisIsAProperty, actualThisIsAProperty);
}
// return the current assertion for method chaining
return myself;
}
/**
* Verifies that the actual AnnotatedClass's thisIsNotAProperty is equal to the given one.
* @param thisIsNotAProperty the given thisIsNotAProperty to compare the actual AnnotatedClass's thisIsNotAProperty to.
* @return this assertion object.
* @throws AssertionError - if the actual AnnotatedClass's thisIsNotAProperty is not equal to the given one.
*/
public S hasThisIsNotAProperty(boolean thisIsNotAProperty) {
// check that actual AnnotatedClass we want to make assertions on is not null.
isNotNull();
// overrides the default error message with a more explicit one
String assertjErrorMessage = "\nExpecting thisIsNotAProperty of:\n <%s>\nto be:\n <%s>\nbut was:\n <%s>";
// check
boolean actualThisIsNotAProperty = actual.thisIsNotAProperty();
if (actualThisIsNotAProperty != thisIsNotAProperty) {
failWithMessage(assertjErrorMessage, actual, thisIsNotAProperty, actualThisIsNotAProperty);
}
// return the current assertion for method chaining
return myself;
}
}