File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,51 @@ TestModel:
110
110
expect (requiredString2.isRequired, true );
111
111
});
112
112
113
+ test ('Test List not supported anymore' , () {
114
+ dynamic error;
115
+ try {
116
+ final config = YmlGeneratorConfig (
117
+ PubspecConfig ("name: test" ),
118
+ """
119
+ TestModel:
120
+ properties:
121
+ list:
122
+ type: array
123
+ items:
124
+ type: String
125
+ """ ,
126
+ '' );
127
+
128
+ config.checkIfTypesAvailable ();
129
+ } catch (e) {
130
+ error = e;
131
+ }
132
+ expect (error, isNotNull);
133
+ });
134
+
135
+ test ('Test Map not supported anymore' , () {
136
+ dynamic error;
137
+ try {
138
+ final config = YmlGeneratorConfig (
139
+ PubspecConfig ("name: test" ),
140
+ """
141
+ TestModel:
142
+ properties:
143
+ list:
144
+ type: map
145
+ items:
146
+ key: String
147
+ value: String
148
+ """ ,
149
+ '' );
150
+
151
+ config.checkIfTypesAvailable ();
152
+ } catch (e) {
153
+ error = e;
154
+ }
155
+ expect (error, isNotNull);
156
+ });
157
+
113
158
test ('Test simple generic fields' , () {
114
159
final models = YmlGeneratorConfig (
115
160
PubspecConfig ("name: test" ),
You can’t perform that action at this time.
0 commit comments