diff --git a/lib/mock/db_mock.dart b/lib/mock/db_mock.dart index a06f003..e7c60c3 100644 --- a/lib/mock/db_mock.dart +++ b/lib/mock/db_mock.dart @@ -1,5 +1,6 @@ import 'package:smoke_cess_app/interface/db_record.dart'; import 'package:smoke_cess_app/models/mood.dart'; +import 'package:smoke_cess_app/models/relapse.dart'; import 'package:smoke_cess_app/models/sleep.dart'; import 'package:smoke_cess_app/services/database_service.dart'; import 'package:sqflite_common/sqlite_api.dart'; @@ -13,6 +14,7 @@ class DatabaseMock implements DatabaseService { final List _moodRecords = []; final List _sleepRecords = []; + final List _relapseRecords = []; final List _workoutRecords = []; @override @@ -27,6 +29,12 @@ class DatabaseMock implements DatabaseService { return Future.value(1); } + @override + Future addRelapse(Relapse relapse) { + _relapseRecords.add(relapse); + return Future.value(1); + } + @override // TODO: implement database Future get database => DatabaseService.instance.database; @@ -40,4 +48,9 @@ class DatabaseMock implements DatabaseService { Future> getSleepRecords() { return Future.value(_sleepRecords); } + + @override + Future> getRelapseRecords() { + return Future.value(_relapseRecords); + } }