@@ -25,7 +25,8 @@ void main() {
25
25
26
26
testCaptureException (bool compressPayload) async {
27
27
final MockClient httpMock = new MockClient ();
28
- final ClockProvider fakeClockProvider = () => new DateTime .utc (2017 , 1 , 2 );
28
+ final ClockProvider fakeClockProvider =
29
+ () => new DateTime .utc (2017 , 1 , 2 );
29
30
30
31
String postUri;
31
32
Map <String , String > headers;
@@ -130,7 +131,7 @@ void main() {
130
131
131
132
test ('reads error message from the x-sentry-error header' , () async {
132
133
final MockClient httpMock = new MockClient ();
133
- final Clock fakeClock = new Clock . fixed ( new DateTime (2017 , 1 , 2 ) );
134
+ final ClockProvider fakeClockProvider = () => DateTime (2017 , 1 , 2 );
134
135
135
136
httpMock.answerWith ((Invocation invocation) async {
136
137
if (invocation.memberName == #close) {
@@ -147,7 +148,7 @@ void main() {
147
148
final SentryClient client = new SentryClient (
148
149
dsn: _testDsn,
149
150
httpClient: httpMock,
150
- clock: fakeClock ,
151
+ clock: fakeClockProvider ,
151
152
uuidGenerator: () => 'X' * 32 ,
152
153
compressPayload: false ,
153
154
environmentAttributes: const Event (
@@ -173,7 +174,7 @@ void main() {
173
174
174
175
test ('$Event userContext overrides client' , () async {
175
176
final MockClient httpMock = new MockClient ();
176
- final Clock fakeClock = new Clock . fixed ( new DateTime (2017 , 1 , 2 ) );
177
+ final ClockProvider fakeClockProvider = () => DateTime (2017 , 1 , 2 );
177
178
178
179
String loggedUserId; // used to find out what user context was sent
179
180
httpMock.answerWith ((Invocation invocation) async {
@@ -208,7 +209,7 @@ void main() {
208
209
final SentryClient client = new SentryClient (
209
210
dsn: _testDsn,
210
211
httpClient: httpMock,
211
- clock: fakeClock ,
212
+ clock: fakeClockProvider ,
212
213
uuidGenerator: () => 'X' * 32 ,
213
214
compressPayload: false ,
214
215
environmentAttributes: const Event (
0 commit comments