Line data Source code
1 : import 'package:stay_points/stay_points.dart';
2 : import 'package:test/test.dart';
3 :
4 : void main() {
5 1 : group('Online stay-point identification', () {
6 : final lat1 = 41.139129;
7 : final lon1 = 1.402244;
8 :
9 1 : final Location location = new Location.fromDegrees(latitude: lat1,
10 1 : longitude: lon1, timestamp: new DateTime.now());
11 :
12 : StayPointIdentification extractor;
13 :
14 1 : setUp(() {
15 1 : Threshold threshold = new Threshold(
16 2 : minimumTime: new Duration(minutes: 4), minimumDistance: new Distance(meters: 20.0));
17 1 : extractor = new StayPointIdentification(threshold);
18 : });
19 :
20 1 : test('Should return UnimplementedError', () {
21 2 : expect(() => extractor.processBuffered(location: location),
22 3 : throwsA(predicate((e) => e is UnimplementedError)));
23 : });
24 : });
25 : }
|