21 lines
897 B
Dart
21 lines
897 B
Dart
import 'dart:async';
|
|
|
|
import 'package:energy_bilance/models/EnergyBilanceModel.dart';
|
|
|
|
void main() async {
|
|
//Location _locationModel;StreamController<Location> _controller;setUp(() {
|
|
_controller = StreamController<EnergyBilanceModel>();
|
|
_energyModel = EnergyBilanceModel();
|
|
});group('[Location Model]', () {
|
|
//test('[Model] Check individual values', () async {
|
|
_locationModel = Location(
|
|
city: 'London',
|
|
countryName: 'England',
|
|
country: 'England',
|
|
currency: 'GBP',
|
|
ip: '',
|
|
inEu: true,
|
|
languages: 'EN',
|
|
);// BEGIN TESTS....
|
|
expect(_locationModel.city, 'London');expect(_locationModel.countryName.runtimeType, equals(String));expect(_locationModel.country, isNotNull);expect(_locationModel.ip, isEmpty);expect(_locationModel.inEu, isTrue);expect(_locationModel.languages, contains('EN'));expect(_locationModel.currency, startsWith('G'));expect(_locationModel.country, matches('England'));
|
|
});} |