@@ -33,8 +33,12 @@ void main() {
3333 case 'getTreatment' :
3434 return '' ;
3535 case 'getTreatments' :
36+ case 'getTreatmentsByFlagSet' :
37+ case 'getTreatmentsByFlagSets' :
3638 return {'split1' : 'on' , 'split2' : 'off' };
3739 case 'getTreatmentsWithConfig' :
40+ case 'getTreatmentsWithConfigByFlagSet' :
41+ case 'getTreatmentsWithConfigByFlagSets' :
3842 return {
3943 'split1' : {'treatment' : 'on' , 'config' : null },
4044 'split2' : {'treatment' : 'off' , 'config' : null }
@@ -185,6 +189,130 @@ void main() {
185189 'attributes' : {'attr1' : true }
186190 });
187191 });
192+
193+ test ('getTreatmentsByFlagSet without attributes' , () async {
194+ _platform.getTreatmentsByFlagSet (
195+ matchingKey: 'matching-key' ,
196+ bucketingKey: 'bucketing-key' ,
197+ flagSet: 'set_1' );
198+
199+ expect (methodName, 'getTreatmentsByFlagSet' );
200+ expect (methodArguments, {
201+ 'flagSet' : 'set_1' ,
202+ 'matchingKey' : 'matching-key' ,
203+ 'bucketingKey' : 'bucketing-key' ,
204+ 'attributes' : {}
205+ });
206+ });
207+
208+ test ('getTreatmentsByFlagSet with attributes' , () async {
209+ _platform.getTreatmentsByFlagSet (
210+ matchingKey: 'matching-key' ,
211+ bucketingKey: 'bucketing-key' ,
212+ flagSet: 'set_1' ,
213+ attributes: {'attr1' : true });
214+
215+ expect (methodName, 'getTreatmentsByFlagSet' );
216+ expect (methodArguments, {
217+ 'flagSet' : 'set_1' ,
218+ 'matchingKey' : 'matching-key' ,
219+ 'bucketingKey' : 'bucketing-key' ,
220+ 'attributes' : {'attr1' : true }
221+ });
222+ });
223+
224+ test ('getTreatmentsByFlagSets without attributes' , () async {
225+ _platform.getTreatmentsByFlagSets (
226+ matchingKey: 'matching-key' ,
227+ bucketingKey: 'bucketing-key' ,
228+ flagSets: ['set_1' , 'set_2' ]);
229+
230+ expect (methodName, 'getTreatmentsByFlagSets' );
231+ expect (methodArguments, {
232+ 'flagSets' : ['set_1' , 'set_2' ],
233+ 'matchingKey' : 'matching-key' ,
234+ 'bucketingKey' : 'bucketing-key' ,
235+ 'attributes' : {}
236+ });
237+ });
238+
239+ test ('getTreatmentsByFlagSets with attributes' , () async {
240+ _platform.getTreatmentsByFlagSets (
241+ matchingKey: 'matching-key' ,
242+ bucketingKey: 'bucketing-key' ,
243+ flagSets: ['set_1' , 'set_2' ],
244+ attributes: {'attr1' : true });
245+
246+ expect (methodName, 'getTreatmentsByFlagSets' );
247+ expect (methodArguments, {
248+ 'flagSets' : ['set_1' , 'set_2' ],
249+ 'matchingKey' : 'matching-key' ,
250+ 'bucketingKey' : 'bucketing-key' ,
251+ 'attributes' : {'attr1' : true }
252+ });
253+ });
254+
255+ test ('getTreatmentsWithConfigByFlagSet without attributes' , () async {
256+ _platform.getTreatmentsWithConfigByFlagSet (
257+ matchingKey: 'matching-key' ,
258+ bucketingKey: 'bucketing-key' ,
259+ flagSet: 'set_1' );
260+
261+ expect (methodName, 'getTreatmentsWithConfigByFlagSet' );
262+ expect (methodArguments, {
263+ 'flagSet' : 'set_1' ,
264+ 'matchingKey' : 'matching-key' ,
265+ 'bucketingKey' : 'bucketing-key' ,
266+ 'attributes' : {}
267+ });
268+ });
269+
270+ test ('getTreatmentsWithConfigByFlagSet with attributes' , () async {
271+ _platform.getTreatmentsWithConfigByFlagSet (
272+ matchingKey: 'matching-key' ,
273+ bucketingKey: 'bucketing-key' ,
274+ flagSet: 'set_1' ,
275+ attributes: {'attr1' : true });
276+
277+ expect (methodName, 'getTreatmentsWithConfigByFlagSet' );
278+ expect (methodArguments, {
279+ 'flagSet' : 'set_1' ,
280+ 'matchingKey' : 'matching-key' ,
281+ 'bucketingKey' : 'bucketing-key' ,
282+ 'attributes' : {'attr1' : true }
283+ });
284+ });
285+
286+ test ('getTreatmentsWithConfigByFlagSets without attributes' , () async {
287+ _platform.getTreatmentsWithConfigByFlagSets (
288+ matchingKey: 'matching-key' ,
289+ bucketingKey: 'bucketing-key' ,
290+ flagSets: ['set_1' , 'set_2' ]);
291+
292+ expect (methodName, 'getTreatmentsWithConfigByFlagSets' );
293+ expect (methodArguments, {
294+ 'flagSets' : ['set_1' , 'set_2' ],
295+ 'matchingKey' : 'matching-key' ,
296+ 'bucketingKey' : 'bucketing-key' ,
297+ 'attributes' : {}
298+ });
299+ });
300+
301+ test ('getTreatmentsWithConfigByFlagSets with attributes' , () async {
302+ _platform.getTreatmentsWithConfigByFlagSets (
303+ matchingKey: 'matching-key' ,
304+ bucketingKey: 'bucketing-key' ,
305+ flagSets: ['set_1' , 'set_2' ],
306+ attributes: {'attr1' : true });
307+
308+ expect (methodName, 'getTreatmentsWithConfigByFlagSets' );
309+ expect (methodArguments, {
310+ 'flagSets' : ['set_1' , 'set_2' ],
311+ 'matchingKey' : 'matching-key' ,
312+ 'bucketingKey' : 'bucketing-key' ,
313+ 'attributes' : {'attr1' : true }
314+ });
315+ });
188316 });
189317
190318 group ('track' , () {
0 commit comments