File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,9 @@ public class ExampleTest {
85
85
86
86
@Test // Snapshot arguments passed to mocked object support ignore of fields
87
87
public void shouldExtractArgsFromFakeMethodWithComplexObject () {
88
- FakeObject fake = new FakeObject .FakeObjectBuilder (). id(" idMock" ). name(" nameMock" ). build();
88
+ FakeObject fake = new FakeObject ();
89
+ fake. setId(" idMock" );
90
+ fake. setName(" nameMock" );
89
91
90
92
// With Ignore
91
93
fakeObject. fakeMethodWithComplexObject(fake);
@@ -105,6 +107,7 @@ public class ExampleTest {
105
107
}
106
108
107
109
class FakeObject {
110
+
108
111
private String id;
109
112
110
113
private Integer value;
@@ -118,6 +121,14 @@ public class ExampleTest {
118
121
void fakeMethodWithComplexObject (Object fakeObj ) {
119
122
120
123
}
124
+
125
+ void setId (String id ) {
126
+ this . id = id;
127
+ }
128
+
129
+ void setName (String name ) {
130
+ this . name = name;
131
+ }
121
132
}
122
133
}
123
134
```
You can’t perform that action at this time.
0 commit comments