Skip to content

Commit ea51acc

Browse files
authored
Remove unused parameters for test constructor (#261)
* Remove unused parameters for test constructor * Update CHANGELOG.md * Clean up whitespace
1 parent b293fc4 commit ea51acc

File tree

11 files changed

+1
-158
lines changed

11 files changed

+1
-158
lines changed

pkgs/unified_analytics/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Any error events (`Event.analyticsException`) encountered within package will be sent when invoking `Analytics.close`; replacing `ErrorHandler` functionality
66
- Exposing new method for `FakeAnalytics.sendPendingErrorEvents` to send error events on command
77
- Added `Event.fromJson` static method to generate instance of `Event` from JSON
8+
- Remove unused parameters `measurementId` and `apiSecret` from the `Analytics.test` constructor
89

910
## 5.8.8
1011

pkgs/unified_analytics/example/serving_surveys.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ void main() async {
3939
final initialAnalytics = Analytics.test(
4040
tool: DashTool.flutterTool,
4141
homeDirectory: home,
42-
measurementId: 'measurementId',
43-
apiSecret: 'apiSecret',
4442
dartVersion: 'dartVersion',
4543
fs: fs,
4644
platform: DevicePlatform.macos,
@@ -52,8 +50,6 @@ void main() async {
5250
analytics = Analytics.test(
5351
tool: DashTool.flutterTool,
5452
homeDirectory: home,
55-
measurementId: 'measurementId',
56-
apiSecret: 'apiSecret',
5753
dartVersion: 'dartVersion',
5854
fs: fs,
5955
platform: DevicePlatform.macos,

pkgs/unified_analytics/lib/src/analytics.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ abstract class Analytics {
190190
factory Analytics.test({
191191
required DashTool tool,
192192
required Directory homeDirectory,
193-
required String measurementId,
194-
required String apiSecret,
195193
required String dartVersion,
196194
required FileSystem fs,
197195
required DevicePlatform platform,

pkgs/unified_analytics/test/error_handler_test.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ void main() {
2222

2323
const homeDirName = 'home';
2424
const initialTool = DashTool.flutterTool;
25-
const measurementId = 'measurementId';
26-
const apiSecret = 'apiSecret';
2725
const toolsMessageVersion = 1;
2826
const toolsMessage = 'toolsMessage';
2927
const flutterChannel = 'flutterChannel';
@@ -46,8 +44,6 @@ void main() {
4644
initializationAnalytics = Analytics.test(
4745
tool: initialTool,
4846
homeDirectory: home,
49-
measurementId: measurementId,
50-
apiSecret: apiSecret,
5147
flutterChannel: flutterChannel,
5248
toolsMessageVersion: toolsMessageVersion,
5349
toolsMessage: toolsMessage,
@@ -68,8 +64,6 @@ void main() {
6864
analytics = Analytics.test(
6965
tool: initialTool,
7066
homeDirectory: home,
71-
measurementId: measurementId,
72-
apiSecret: apiSecret,
7367
flutterChannel: flutterChannel,
7468
toolsMessageVersion: toolsMessageVersion,
7569
toolsMessage: toolsMessage,
@@ -102,8 +96,6 @@ void main() {
10296
final secondAnalytics = Analytics.test(
10397
tool: initialTool,
10498
homeDirectory: home,
105-
measurementId: measurementId,
106-
apiSecret: apiSecret,
10799
flutterChannel: flutterChannel,
108100
toolsMessageVersion: toolsMessageVersion,
109101
toolsMessage: toolsMessage,

pkgs/unified_analytics/test/events_with_fake_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ void main() {
6161
final initialAnalytics = Analytics.test(
6262
tool: DashTool.flutterTool,
6363
homeDirectory: homeDirectory,
64-
measurementId: 'measurementId',
65-
apiSecret: 'apiSecret',
6664
dartVersion: 'dartVersion',
6765
toolsMessageVersion: 1,
6866
fs: fs,

pkgs/unified_analytics/test/legacy_analytics_test.dart

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ void main() {
1818

1919
const homeDirName = 'home';
2020
const initialTool = DashTool.flutterTool;
21-
const measurementId = 'measurementId';
22-
const apiSecret = 'apiSecret';
2321
const toolsMessageVersion = 1;
2422
const toolsMessage = 'toolsMessage';
2523
const flutterChannel = 'flutterChannel';
@@ -54,8 +52,6 @@ void main() {
5452
analytics = Analytics.test(
5553
tool: initialTool,
5654
homeDirectory: home,
57-
measurementId: measurementId,
58-
apiSecret: apiSecret,
5955
flutterChannel: flutterChannel,
6056
toolsMessageVersion: toolsMessageVersion,
6157
toolsMessage: toolsMessage,
@@ -87,8 +83,6 @@ void main() {
8783
analytics = Analytics.test(
8884
tool: initialTool,
8985
homeDirectory: home,
90-
measurementId: measurementId,
91-
apiSecret: apiSecret,
9286
flutterChannel: flutterChannel,
9387
toolsMessageVersion: toolsMessageVersion,
9488
toolsMessage: toolsMessage,
@@ -119,8 +113,6 @@ void main() {
119113
analytics = Analytics.test(
120114
tool: initialTool,
121115
homeDirectory: home,
122-
measurementId: measurementId,
123-
apiSecret: apiSecret,
124116
flutterChannel: flutterChannel,
125117
toolsMessageVersion: toolsMessageVersion,
126118
toolsMessage: toolsMessage,
@@ -151,8 +143,6 @@ void main() {
151143
analytics = Analytics.test(
152144
tool: initialTool,
153145
homeDirectory: home,
154-
measurementId: measurementId,
155-
apiSecret: apiSecret,
156146
flutterChannel: flutterChannel,
157147
toolsMessageVersion: toolsMessageVersion,
158148
toolsMessage: toolsMessage,
@@ -187,8 +177,6 @@ void main() {
187177
analytics = Analytics.test(
188178
tool: initialTool,
189179
homeDirectory: home,
190-
measurementId: measurementId,
191-
apiSecret: apiSecret,
192180
flutterChannel: flutterChannel,
193181
toolsMessageVersion: toolsMessageVersion,
194182
toolsMessage: toolsMessage,
@@ -223,8 +211,6 @@ void main() {
223211
analytics = Analytics.test(
224212
tool: initialTool,
225213
homeDirectory: home,
226-
measurementId: measurementId,
227-
apiSecret: apiSecret,
228214
flutterChannel: flutterChannel,
229215
toolsMessageVersion: toolsMessageVersion,
230216
toolsMessage: toolsMessage,
@@ -257,8 +243,6 @@ NOT VALID JSON
257243
analytics = Analytics.test(
258244
tool: initialTool,
259245
homeDirectory: home,
260-
measurementId: measurementId,
261-
apiSecret: apiSecret,
262246
flutterChannel: flutterChannel,
263247
toolsMessageVersion: toolsMessageVersion,
264248
toolsMessage: toolsMessage,
@@ -295,8 +279,6 @@ NOT VALID JSON
295279
analytics = Analytics.test(
296280
tool: initialTool,
297281
homeDirectory: home,
298-
measurementId: measurementId,
299-
apiSecret: apiSecret,
300282
flutterChannel: flutterChannel,
301283
toolsMessageVersion: toolsMessageVersion,
302284
toolsMessage: toolsMessage,
@@ -329,8 +311,6 @@ NOT VALID JSON
329311
analytics = Analytics.test(
330312
tool: initialTool,
331313
homeDirectory: home,
332-
measurementId: measurementId,
333-
apiSecret: apiSecret,
334314
flutterChannel: flutterChannel,
335315
toolsMessageVersion: toolsMessageVersion,
336316
toolsMessage: toolsMessage,

pkgs/unified_analytics/test/log_handler_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ void main() {
3333
final initializationAnalytics = Analytics.test(
3434
tool: DashTool.flutterTool,
3535
homeDirectory: homeDirectory,
36-
measurementId: 'measurementId',
37-
apiSecret: 'apiSecret',
3836
dartVersion: 'dartVersion',
3937
fs: fs,
4038
platform: DevicePlatform.macos,
@@ -46,8 +44,6 @@ void main() {
4644
analytics = Analytics.test(
4745
tool: DashTool.flutterTool,
4846
homeDirectory: homeDirectory,
49-
measurementId: 'measurementId',
50-
apiSecret: 'apiSecret',
5147
dartVersion: 'dartVersion',
5248
fs: fs,
5349
platform: DevicePlatform.macos,

pkgs/unified_analytics/test/suppression_test.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ void main() {
1818

1919
const homeDirName = 'home';
2020
const initialTool = DashTool.flutterTool;
21-
const measurementId = 'measurementId';
22-
const apiSecret = 'apiSecret';
2321
const toolsMessageVersion = 1;
2422
const toolsMessage = 'toolsMessage';
2523
const flutterChannel = 'flutterChannel';
@@ -41,8 +39,6 @@ void main() {
4139
initializationAnalytics = Analytics.test(
4240
tool: initialTool,
4341
homeDirectory: home,
44-
measurementId: measurementId,
45-
apiSecret: apiSecret,
4642
flutterChannel: flutterChannel,
4743
toolsMessageVersion: toolsMessageVersion,
4844
toolsMessage: toolsMessage,
@@ -61,8 +57,6 @@ void main() {
6157
analytics = Analytics.test(
6258
tool: initialTool,
6359
homeDirectory: home,
64-
measurementId: measurementId,
65-
apiSecret: apiSecret,
6660
flutterChannel: flutterChannel,
6761
toolsMessageVersion: toolsMessageVersion,
6862
toolsMessage: toolsMessage,
@@ -97,8 +91,6 @@ void main() {
9791
final secondAnalytics = Analytics.test(
9892
tool: initialTool,
9993
homeDirectory: home,
100-
measurementId: measurementId,
101-
apiSecret: apiSecret,
10294
flutterChannel: flutterChannel,
10395
toolsMessageVersion: toolsMessageVersion,
10496
toolsMessage: toolsMessage,

0 commit comments

Comments
 (0)