import 'package:platform_framework/platform_framework.dart'; import 'package:test/test.dart'; void main() { test('null', () { expect(Service.parseId('null'), 'null'); expect(Service.parseId(null), 'null'); }); test('String', () { expect(Service.parseId('23'), '23'); }); test('int', () { expect(Service.parseId('23'), 23); }); test('double', () { expect(Service.parseId('23.4'), 23.4); }); test('num', () { expect(Service.parseId('23.4'), 23.4); }); test('bool', () { expect(Service.parseId('true'), true); expect(Service.parseId(true), true); expect(Service.parseId('false'), false); expect(Service.parseId(false), false); expect(Service.parseId('hmm'), false); }); }