@@ -30,6 +30,8 @@ void main() {
30
30
expect (cameraUpdate.updateType, CameraUpdateType .newCameraPosition);
31
31
cameraUpdate as CameraUpdateNewCameraPosition ;
32
32
expect (cameraUpdate.cameraPosition, cameraPosition);
33
+ final List <Object > jsonList = cameraUpdate.toJson () as List <Object >;
34
+ expect (jsonList[0 ], 'newCameraPosition' );
33
35
});
34
36
35
37
test ('CameraUpdate.newLatLng' , () {
@@ -39,6 +41,8 @@ void main() {
39
41
expect (cameraUpdate.updateType, CameraUpdateType .newLatLng);
40
42
cameraUpdate as CameraUpdateNewLatLng ;
41
43
expect (cameraUpdate.latLng, latLng);
44
+ final List <Object > jsonList = cameraUpdate.toJson () as List <Object >;
45
+ expect (jsonList[0 ], 'newLatLng' );
42
46
});
43
47
44
48
test ('CameraUpdate.newLatLngBounds' , () {
@@ -52,6 +56,8 @@ void main() {
52
56
cameraUpdate as CameraUpdateNewLatLngBounds ;
53
57
expect (cameraUpdate.bounds, latLngBounds);
54
58
expect (cameraUpdate.padding, padding);
59
+ final List <Object > jsonList = cameraUpdate.toJson () as List <Object >;
60
+ expect (jsonList[0 ], 'newLatLngBounds' );
55
61
});
56
62
57
63
test ('CameraUpdate.newLatLngZoom' , () {
@@ -63,6 +69,8 @@ void main() {
63
69
cameraUpdate as CameraUpdateNewLatLngZoom ;
64
70
expect (cameraUpdate.latLng, latLng);
65
71
expect (cameraUpdate.zoom, zoom);
72
+ final List <Object > jsonList = cameraUpdate.toJson () as List <Object >;
73
+ expect (jsonList[0 ], 'newLatLngZoom' );
66
74
});
67
75
68
76
test ('CameraUpdate.scrollBy' , () {
@@ -74,6 +82,8 @@ void main() {
74
82
cameraUpdate as CameraUpdateScrollBy ;
75
83
expect (cameraUpdate.dx, dx);
76
84
expect (cameraUpdate.dy, dy);
85
+ final List <Object > jsonList = cameraUpdate.toJson () as List <Object >;
86
+ expect (jsonList[0 ], 'scrollBy' );
77
87
});
78
88
79
89
test ('CameraUpdate.zoomBy' , () {
@@ -85,17 +95,23 @@ void main() {
85
95
cameraUpdate as CameraUpdateZoomBy ;
86
96
expect (cameraUpdate.amount, amount);
87
97
expect (cameraUpdate.focus, focus);
98
+ final List <Object > jsonList = cameraUpdate.toJson () as List <Object >;
99
+ expect (jsonList[0 ], 'zoomBy' );
88
100
});
89
101
90
102
test ('CameraUpdate.zoomIn' , () {
91
103
final CameraUpdate cameraUpdate = CameraUpdate .zoomIn ();
92
104
expect (cameraUpdate.runtimeType, CameraUpdateZoomIn );
93
105
expect (cameraUpdate.updateType, CameraUpdateType .zoomIn);
106
+ final List <Object > jsonList = cameraUpdate.toJson () as List <Object >;
107
+ expect (jsonList[0 ], 'zoomIn' );
94
108
});
95
109
96
110
test ('CameraUpdate.zoomOut' , () {
97
111
final CameraUpdate cameraUpdate = CameraUpdate .zoomOut ();
98
112
expect (cameraUpdate.runtimeType, CameraUpdateZoomOut );
99
113
expect (cameraUpdate.updateType, CameraUpdateType .zoomOut);
114
+ final List <Object > jsonList = cameraUpdate.toJson () as List <Object >;
115
+ expect (jsonList[0 ], 'zoomOut' );
100
116
});
101
117
}
0 commit comments