diff --git a/pubspec.lock b/pubspec.lock index 4f9e32c1..7593fed5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -197,6 +197,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.0.0" + coverage: + dependency: transitive + description: + name: coverage + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" crypto: dependency: transitive description: @@ -648,6 +655,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.2" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" normalize: dependency: transitive description: @@ -886,6 +900,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.4" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" shelf_web_socket: dependency: transitive description: @@ -933,6 +961,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.10" source_span: dependency: transitive description: @@ -975,13 +1017,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.17.12" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.3" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" timezone: dependency: transitive description: @@ -1101,6 +1157,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.1" + vm_service: + dependency: transitive + description: + name: vm_service + url: "https://pub.dartlang.org" + source: hosted + version: "7.5.0" watcher: dependency: transitive description: @@ -1115,6 +1178,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b2be261d..72c3f090 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -49,6 +49,7 @@ dev_dependencies: flutter_test: sdk: flutter hive_generator: ^1.1.0 + test: ^1.14.4 flutter_icons: android: "launcher_icon" diff --git a/test/model_tests/landmark_test.dart b/test/model_tests/landmark_test.dart new file mode 100644 index 00000000..6401f016 --- /dev/null +++ b/test/model_tests/landmark_test.dart @@ -0,0 +1,19 @@ +import 'package:beacon/models/landmarks/landmark.dart'; +import 'package:test/test.dart'; + +void main() { + Map dummyJson = { + "title": "landmark", + "location": {"lat": "100.1", "lon": "200.1"} + }; + + test('Checking if landmark fetch from Json is working: ', () { + Landmark landmark = Landmark.fromJson(dummyJson); + //landmark title + expect("landmark", landmark.title); + //landmark latitude + expect("100.1", landmark.location.lat); + //landmark longitude + expect("200.1", landmark.location.lon); + }); +}