mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-05 23:44:02 +01:00
Add tables for workout sessions
This commit is contained in:
33
lib/database/converters/int_to_string_converter.dart
Normal file
33
lib/database/converters/int_to_string_converter.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, 2020- wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class IntToStringConverter extends TypeConverter<int, String> {
|
||||
const IntToStringConverter();
|
||||
|
||||
@override
|
||||
int fromSql(String fromDb) {
|
||||
return int.parse(fromDb);
|
||||
}
|
||||
|
||||
@override
|
||||
String toSql(int value) {
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
35
lib/database/converters/time_of_day_converter.dart
Normal file
35
lib/database/converters/time_of_day_converter.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, 2020- wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wger/helpers/json.dart';
|
||||
|
||||
class TimeOfDayConverter extends TypeConverter<TimeOfDay, String> {
|
||||
const TimeOfDayConverter();
|
||||
|
||||
@override
|
||||
TimeOfDay fromSql(String fromDb) {
|
||||
return stringToTimeNull(fromDb)!;
|
||||
}
|
||||
|
||||
@override
|
||||
String toSql(TimeOfDay value) {
|
||||
return timeToString(value)!;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,28 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:drift_sqlite_async/drift_sqlite_async.dart';
|
||||
import 'package:flutter/material.dart' show TimeOfDay;
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:powersync/powersync.dart' show uuid;
|
||||
import 'package:wger/database/converters/int_to_string_converter.dart';
|
||||
import 'package:wger/database/converters/time_of_day_converter.dart';
|
||||
import 'package:wger/models/body_weight/weight_entry.dart';
|
||||
import 'package:wger/models/exercises/category.dart';
|
||||
import 'package:wger/models/exercises/equipment.dart';
|
||||
@@ -12,11 +33,14 @@ import 'package:wger/models/exercises/muscle.dart';
|
||||
import 'package:wger/models/exercises/translation.dart';
|
||||
import 'package:wger/models/exercises/video.dart';
|
||||
import 'package:wger/models/measurements/measurement_category.dart';
|
||||
import 'package:wger/models/workouts/log.dart';
|
||||
import 'package:wger/models/workouts/session.dart';
|
||||
|
||||
import 'powersync.dart';
|
||||
import 'tables/exercise.dart';
|
||||
import 'tables/language.dart';
|
||||
import 'tables/measurements.dart';
|
||||
import 'tables/routines.dart';
|
||||
import 'tables/weight.dart';
|
||||
|
||||
part 'database.g.dart';
|
||||
@@ -41,7 +65,8 @@ part 'database.g.dart';
|
||||
// User data
|
||||
WeightEntryTable,
|
||||
MeasurementCategoryTable,
|
||||
// WorkoutLogTable,
|
||||
WorkoutLogTable,
|
||||
WorkoutSessionTable,
|
||||
],
|
||||
//include: {'queries.drift'},
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,29 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:powersync/powersync.dart' show uuid;
|
||||
import 'package:wger/database/converters/int_to_string_converter.dart';
|
||||
import 'package:wger/database/converters/time_of_day_converter.dart';
|
||||
import 'package:wger/models/workouts/log.dart';
|
||||
import 'package:wger/models/workouts/session.dart';
|
||||
|
||||
// @UseRowClass(Log)
|
||||
@UseRowClass(Log)
|
||||
class WorkoutLogTable extends Table {
|
||||
@override
|
||||
String get tableName => 'manager_workoutlog';
|
||||
@@ -26,3 +48,19 @@ class WorkoutLogTable extends Table {
|
||||
|
||||
DateTimeColumn get date => dateTime()();
|
||||
}
|
||||
|
||||
@UseRowClass(WorkoutSession)
|
||||
class WorkoutSessionTable extends Table {
|
||||
@override
|
||||
String get tableName => 'manager_workoutsession';
|
||||
|
||||
TextColumn get id => text().clientDefault(() => uuid.v4())();
|
||||
IntColumn get routineId => integer().named('routine_id').nullable()();
|
||||
IntColumn get dayId => integer().named('day_id').nullable()();
|
||||
DateTimeColumn get date => dateTime()();
|
||||
TextColumn get notes => text()();
|
||||
TextColumn get impression => text().map(const IntToStringConverter())();
|
||||
TextColumn get timeStart =>
|
||||
text().named('time_start').nullable().map(const TimeOfDayConverter())();
|
||||
TextColumn get timeEnd => text().named('time_end').nullable().map(const TimeOfDayConverter())();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (C) 2020, 2021 wger Team
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
@@ -16,7 +16,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:drift/drift.dart' as drift;
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:wger/database/powersync/database.dart';
|
||||
import 'package:wger/helpers/consts.dart';
|
||||
import 'package:wger/helpers/json.dart';
|
||||
import 'package:wger/helpers/misc.dart';
|
||||
@@ -27,10 +29,14 @@ import 'package:wger/models/workouts/weight_unit.dart';
|
||||
|
||||
part 'log.g.dart';
|
||||
|
||||
/// Temporary fix for id conversion: the "id" field used in the drift database
|
||||
/// is a UUID string, but the JSON data is the database ID.
|
||||
String? idFromJson(Object? value) => value?.toString();
|
||||
|
||||
@JsonSerializable()
|
||||
class Log {
|
||||
@JsonKey(required: true)
|
||||
int? id;
|
||||
@JsonKey(required: true, fromJson: idFromJson)
|
||||
String? id;
|
||||
|
||||
@JsonKey(required: true, name: 'exercise')
|
||||
late int exerciseId;
|
||||
@@ -120,6 +126,36 @@ class Log {
|
||||
rirTarget = data.rir;
|
||||
}
|
||||
|
||||
WorkoutLogTableCompanion toCompanion({bool includeId = false}) {
|
||||
return WorkoutLogTableCompanion(
|
||||
id: includeId && id != null ? drift.Value(id!) : const drift.Value.absent(),
|
||||
exerciseId: drift.Value(exerciseId),
|
||||
routineId: drift.Value(routineId),
|
||||
sessionId: sessionId != null ? drift.Value(sessionId) : const drift.Value.absent(),
|
||||
iteration: iteration != null ? drift.Value(iteration) : const drift.Value.absent(),
|
||||
slotEntryId: slotEntryId != null ? drift.Value(slotEntryId) : const drift.Value.absent(),
|
||||
rir: rir != null ? drift.Value(rir!.toDouble()) : const drift.Value.absent(),
|
||||
rirTarget: rirTarget != null
|
||||
? drift.Value(rirTarget!.toDouble())
|
||||
: const drift.Value.absent(),
|
||||
repetitions: repetitions != null
|
||||
? drift.Value(repetitions!.toDouble())
|
||||
: const drift.Value.absent(),
|
||||
repetitionsTarget: repetitionsTarget != null
|
||||
? drift.Value(repetitionsTarget!.toDouble())
|
||||
: const drift.Value.absent(),
|
||||
repetitionsUnitId: repetitionsUnitId != null
|
||||
? drift.Value(repetitionsUnitId)
|
||||
: const drift.Value.absent(),
|
||||
weight: weight != null ? drift.Value(weight!.toDouble()) : const drift.Value.absent(),
|
||||
weightTarget: weightTarget != null
|
||||
? drift.Value(weightTarget!.toDouble())
|
||||
: const drift.Value.absent(),
|
||||
weightUnitId: weightUnitId != null ? drift.Value(weightUnitId) : const drift.Value.absent(),
|
||||
date: drift.Value(date.toUtc()),
|
||||
);
|
||||
}
|
||||
|
||||
// Boilerplate
|
||||
factory Log.fromJson(Map<String, dynamic> json) => _$LogFromJson(json);
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'log.dart';
|
||||
@@ -26,7 +44,7 @@ Log _$LogFromJson(Map<String, dynamic> json) {
|
||||
],
|
||||
);
|
||||
return Log(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
id: idFromJson(json['id']),
|
||||
exerciseId: (json['exercise'] as num).toInt(),
|
||||
iteration: (json['iteration'] as num?)?.toInt(),
|
||||
slotEntryId: (json['slot_entry'] as num?)?.toInt(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (C) 2020, 2021 wger Team
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
@@ -16,8 +16,10 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:drift/drift.dart' as drift;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:wger/database/powersync/database.dart';
|
||||
import 'package:wger/helpers/json.dart';
|
||||
import 'package:wger/models/workouts/log.dart';
|
||||
|
||||
@@ -28,7 +30,7 @@ const IMPRESSION_MAP = {1: 'bad', 2: 'neutral', 3: 'good'};
|
||||
@JsonSerializable()
|
||||
class WorkoutSession {
|
||||
@JsonKey(required: true)
|
||||
int? id;
|
||||
String? id;
|
||||
|
||||
@JsonKey(required: true, name: 'routine')
|
||||
late int? routineId;
|
||||
@@ -68,6 +70,19 @@ class WorkoutSession {
|
||||
this.date = date ?? DateTime.now();
|
||||
}
|
||||
|
||||
WorkoutSessionTableCompanion toCompanion({bool includeId = false}) {
|
||||
return WorkoutSessionTableCompanion(
|
||||
id: includeId && id != null ? drift.Value(id!) : const drift.Value.absent(),
|
||||
routineId: routineId != null ? drift.Value(routineId) : const drift.Value.absent(),
|
||||
dayId: dayId != null ? drift.Value(dayId) : const drift.Value.absent(),
|
||||
date: drift.Value(date.toUtc()),
|
||||
notes: drift.Value(notes),
|
||||
impression: drift.Value(impression),
|
||||
timeStart: timeStart != null ? drift.Value(timeStart) : const drift.Value.absent(),
|
||||
timeEnd: timeEnd != null ? drift.Value(timeEnd) : const drift.Value.absent(),
|
||||
);
|
||||
}
|
||||
|
||||
// Boilerplate
|
||||
factory WorkoutSession.fromJson(Map<String, dynamic> json) => _$WorkoutSessionFromJson(json);
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'session.dart';
|
||||
@@ -20,7 +38,7 @@ WorkoutSession _$WorkoutSessionFromJson(Map<String, dynamic> json) {
|
||||
],
|
||||
);
|
||||
return WorkoutSession(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
id: json['id'] as String?,
|
||||
dayId: (json['day'] as num?)?.toInt(),
|
||||
routineId: (json['routine'] as num?)?.toInt(),
|
||||
impression: json['impression'] == null ? 2 : int.parse(json['impression'] as String),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
* Copyright (c) 2020, 2020- wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:powersync/powersync.dart';
|
||||
|
||||
Schema schema = const Schema([
|
||||
@@ -175,4 +193,20 @@ Schema schema = const Schema([
|
||||
Index('weight_unit', [IndexedColumn('weight_unit_id')]),
|
||||
],
|
||||
),
|
||||
Table(
|
||||
'manager_workoutsession',
|
||||
[
|
||||
Column.integer('routine_id'),
|
||||
Column.integer('day_id'),
|
||||
Column.text('date'),
|
||||
Column.text('notes'),
|
||||
Column.text('impression'),
|
||||
Column.text('time_start'),
|
||||
Column.text('time_end'),
|
||||
],
|
||||
indexes: [
|
||||
Index('routine', [IndexedColumn('routine_id')]),
|
||||
Index('day', [IndexedColumn('day_id')]),
|
||||
],
|
||||
),
|
||||
]);
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
// Helper to read body weight entries from PowerSync local database and convert to WeightEntry
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
63
lib/providers/workout_log_repository.dart
Normal file
63
lib/providers/workout_log_repository.dart
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Repository for body weight network operations.
|
||||
*/
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:wger/models/workouts/log.dart';
|
||||
|
||||
import '../database/powersync/database.dart';
|
||||
|
||||
final workoutLogRepositoryProvider = Provider<WorkoutLogRepository>((ref) {
|
||||
final db = ref.read(driftPowerSyncDatabase);
|
||||
return WorkoutLogRepository(db);
|
||||
});
|
||||
|
||||
class WorkoutLogRepository {
|
||||
final _logger = Logger('WorkoutLogRepository');
|
||||
final DriftPowersyncDatabase _db;
|
||||
|
||||
WorkoutLogRepository(this._db);
|
||||
|
||||
Stream<List<Log>> watchAllDrift() {
|
||||
_logger.finer('Watching all local workout log entries');
|
||||
final query = _db.select(_db.workoutLogTable)
|
||||
..orderBy([(t) => OrderingTerm(expression: t.date, mode: OrderingMode.desc)]);
|
||||
return query.watch();
|
||||
}
|
||||
|
||||
Future<void> deleteLocalDrift(String id) async {
|
||||
_logger.finer('Deleting local workout log entry $id');
|
||||
await (_db.delete(_db.workoutLogTable)..where((t) => t.id.equals(id))).go();
|
||||
}
|
||||
|
||||
Future<void> updateLocalDrift(Log log) async {
|
||||
_logger.finer('Updating local workout log entry ${log.id}');
|
||||
final stmt = _db.update(_db.workoutLogTable)..where((t) => t.id.equals(log.id!));
|
||||
await stmt.write(log.toCompanion());
|
||||
}
|
||||
|
||||
Future<void> addLocalDrift(Log log) async {
|
||||
_logger.finer('Adding local workout log entry ${log.date}');
|
||||
await _db.into(_db.workoutLogTable).insert(log.toCompanion());
|
||||
}
|
||||
}
|
||||
56
lib/providers/workout_logs.dart
Normal file
56
lib/providers/workout_logs.dart
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:wger/models/workouts/log.dart';
|
||||
|
||||
import 'workout_log_repository.dart';
|
||||
|
||||
part 'workout_logs.g.dart';
|
||||
|
||||
@riverpod
|
||||
final class WorkoutLogNotifier extends _$WorkoutLogNotifier {
|
||||
final _log = Logger('WorkoutLogNotifier');
|
||||
late final WorkoutLogRepository _repo;
|
||||
|
||||
@override
|
||||
Stream<List<Log>> build() {
|
||||
_repo = ref.read(workoutLogRepositoryProvider);
|
||||
|
||||
// final state = BodyWeightState();
|
||||
// repo.watchAllDrift(database).listen((entries) {
|
||||
// state.setItems(entries);
|
||||
// });
|
||||
// return state;
|
||||
|
||||
return _repo.watchAllDrift();
|
||||
}
|
||||
|
||||
Future<void> deleteEntry(String id) async {
|
||||
await _repo.deleteLocalDrift(id);
|
||||
}
|
||||
|
||||
Future<void> updateEntry(Log log) async {
|
||||
await _repo.updateLocalDrift(log);
|
||||
}
|
||||
|
||||
Future<void> addEntry(Log log) async {
|
||||
await _repo.addLocalDrift(log);
|
||||
}
|
||||
}
|
||||
73
lib/providers/workout_logs.g.dart
Normal file
73
lib/providers/workout_logs.g.dart
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'workout_logs.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(WorkoutLogNotifier)
|
||||
const workoutLogProvider = WorkoutLogNotifierProvider._();
|
||||
|
||||
final class WorkoutLogNotifierProvider
|
||||
extends $StreamNotifierProvider<WorkoutLogNotifier, List<Log>> {
|
||||
const WorkoutLogNotifierProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'workoutLogProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$workoutLogNotifierHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
WorkoutLogNotifier create() => WorkoutLogNotifier();
|
||||
}
|
||||
|
||||
String _$workoutLogNotifierHash() => r'8ec76c8d9c72c6bc482952763d048c5df110bd6e';
|
||||
|
||||
abstract class _$WorkoutLogNotifier extends $StreamNotifier<List<Log>> {
|
||||
Stream<List<Log>> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<AsyncValue<List<Log>>, List<Log>>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AsyncValue<List<Log>>, List<Log>>,
|
||||
AsyncValue<List<Log>>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
56
lib/providers/workout_session.dart
Normal file
56
lib/providers/workout_session.dart
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:wger/models/workouts/log.dart';
|
||||
import 'package:wger/models/workouts/session.dart';
|
||||
import 'package:wger/providers/workout_session_repository.dart';
|
||||
|
||||
part 'workout_session.g.dart';
|
||||
|
||||
@riverpod
|
||||
final class WorkoutSessionNotifier extends _$WorkoutSessionNotifier {
|
||||
final _log = Logger('WorkoutSessionNotifier');
|
||||
late final WorkoutSessionRepository _repo;
|
||||
|
||||
@override
|
||||
Stream<List<WorkoutSession>> build() {
|
||||
_repo = ref.read(workoutSessionRepositoryProvider);
|
||||
|
||||
// final state = BodyWeightState();
|
||||
// repo.watchAllDrift(database).listen((entries) {
|
||||
// state.setItems(entries);
|
||||
// });
|
||||
// return state;
|
||||
|
||||
return _repo.watchAllDrift();
|
||||
}
|
||||
|
||||
Future<void> deleteEntry(String id) async {
|
||||
await _repo.deleteLocalDrift(id);
|
||||
}
|
||||
|
||||
Future<void> updateEntry(WorkoutSession entry) async {
|
||||
await _repo.updateLocalDrift(entry);
|
||||
}
|
||||
|
||||
Future<void> addEntry(WorkoutSession entry) async {
|
||||
await _repo.addLocalDrift(entry);
|
||||
}
|
||||
}
|
||||
73
lib/providers/workout_session.g.dart
Normal file
73
lib/providers/workout_session.g.dart
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'workout_session.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(WorkoutSessionNotifier)
|
||||
const workoutSessionProvider = WorkoutSessionNotifierProvider._();
|
||||
|
||||
final class WorkoutSessionNotifierProvider
|
||||
extends $StreamNotifierProvider<WorkoutSessionNotifier, List<WorkoutSession>> {
|
||||
const WorkoutSessionNotifierProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'workoutSessionProvider',
|
||||
isAutoDispose: true,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$workoutSessionNotifierHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
WorkoutSessionNotifier create() => WorkoutSessionNotifier();
|
||||
}
|
||||
|
||||
String _$workoutSessionNotifierHash() => r'2d2a67179eb60855d6985af73429e39db4f80886';
|
||||
|
||||
abstract class _$WorkoutSessionNotifier extends $StreamNotifier<List<WorkoutSession>> {
|
||||
Stream<List<WorkoutSession>> build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
final created = build();
|
||||
final ref = this.ref as $Ref<AsyncValue<List<WorkoutSession>>, List<WorkoutSession>>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<AsyncValue<List<WorkoutSession>>, List<WorkoutSession>>,
|
||||
AsyncValue<List<WorkoutSession>>,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, created);
|
||||
}
|
||||
}
|
||||
63
lib/providers/workout_session_repository.dart
Normal file
63
lib/providers/workout_session_repository.dart
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Repository for body weight network operations.
|
||||
*/
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:wger/models/workouts/session.dart';
|
||||
|
||||
import '../database/powersync/database.dart';
|
||||
|
||||
final workoutSessionRepositoryProvider = Provider<WorkoutSessionRepository>((ref) {
|
||||
final db = ref.read(driftPowerSyncDatabase);
|
||||
return WorkoutSessionRepository(db);
|
||||
});
|
||||
|
||||
class WorkoutSessionRepository {
|
||||
final _logger = Logger('WorkoutSessionRepository');
|
||||
final DriftPowersyncDatabase _db;
|
||||
|
||||
WorkoutSessionRepository(this._db);
|
||||
|
||||
Stream<List<WorkoutSession>> watchAllDrift() {
|
||||
_logger.finer('Watching all local workout session entries');
|
||||
final query = _db.select(_db.workoutSessionTable)
|
||||
..orderBy([(t) => OrderingTerm(expression: t.date, mode: OrderingMode.desc)]);
|
||||
return query.watch();
|
||||
}
|
||||
|
||||
Future<void> deleteLocalDrift(String id) async {
|
||||
_logger.finer('Deleting local workout session entry $id');
|
||||
await (_db.delete(_db.workoutSessionTable)..where((t) => t.id.equals(id))).go();
|
||||
}
|
||||
|
||||
Future<void> updateLocalDrift(WorkoutSession session) async {
|
||||
_logger.finer('Updating local workout session entry ${session.id}');
|
||||
final stmt = _db.update(_db.workoutSessionTable)..where((t) => t.id.equals(session.id!));
|
||||
await stmt.write(session.toCompanion());
|
||||
}
|
||||
|
||||
Future<void> addLocalDrift(WorkoutSession session) async {
|
||||
_logger.finer('Adding local workout session entry ${session.date}');
|
||||
await _db.into(_db.workoutSessionTable).insert(session.toCompanion());
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,21 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/core/validators_test.dart.
|
||||
// Do not manually edit this file.
|
||||
@@ -3622,6 +3640,28 @@ class MockAppLocalizations extends _i1.Mock implements _i2.AppLocalizations {
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
String get youAreOffline =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#youAreOffline),
|
||||
returnValue: _i3.dummyValue<String>(
|
||||
this,
|
||||
Invocation.getter(#youAreOffline),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
String get offlineModeInfo =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#offlineModeInfo),
|
||||
returnValue: _i3.dummyValue<String>(
|
||||
this,
|
||||
Invocation.getter(#offlineModeInfo),
|
||||
),
|
||||
)
|
||||
as String);
|
||||
|
||||
@override
|
||||
String exerciseNr(String? nr) =>
|
||||
(super.noSuchMethod(
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/day_form_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/forms/session_form_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,14 +1,32 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/gym_mode_screen_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i20;
|
||||
import 'dart:ui' as _i22;
|
||||
import 'dart:async' as _i19;
|
||||
import 'dart:ui' as _i21;
|
||||
|
||||
import 'package:http/http.dart' as _i3;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i25;
|
||||
import 'package:mockito/src/dummies.dart' as _i24;
|
||||
import 'package:wger/database/exercises/exercise_database.dart' as _i5;
|
||||
import 'package:wger/models/exercises/category.dart' as _i7;
|
||||
import 'package:wger/models/exercises/equipment.dart' as _i8;
|
||||
@@ -17,8 +35,7 @@ import 'package:wger/models/exercises/language.dart' as _i10;
|
||||
import 'package:wger/models/exercises/muscle.dart' as _i9;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i17;
|
||||
import 'package:wger/models/workouts/day.dart' as _i14;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i24;
|
||||
import 'package:wger/models/workouts/log.dart' as _i19;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i23;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i12;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i13;
|
||||
import 'package:wger/models/workouts/session.dart' as _i18;
|
||||
@@ -27,8 +44,8 @@ import 'package:wger/models/workouts/slot_entry.dart' as _i16;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i11;
|
||||
import 'package:wger/providers/auth.dart' as _i2;
|
||||
import 'package:wger/providers/base_provider.dart' as _i4;
|
||||
import 'package:wger/providers/exercises.dart' as _i21;
|
||||
import 'package:wger/providers/routines.dart' as _i23;
|
||||
import 'package:wger/providers/exercises.dart' as _i20;
|
||||
import 'package:wger/providers/routines.dart' as _i22;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -125,10 +142,6 @@ class _FakeWorkoutSession_18 extends _i1.SmartFake implements _i18.WorkoutSessio
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_19 extends _i1.SmartFake implements _i19.Log {
|
||||
_FakeLog_19(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [WgerBaseProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
@@ -200,65 +213,65 @@ class MockWgerBaseProvider extends _i1.Mock implements _i4.WgerBaseProvider {
|
||||
as Uri);
|
||||
|
||||
@override
|
||||
_i20.Future<dynamic> fetch(Uri? uri) =>
|
||||
_i19.Future<dynamic> fetch(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetch, [uri]),
|
||||
returnValue: _i20.Future<dynamic>.value(),
|
||||
returnValue: _i19.Future<dynamic>.value(),
|
||||
)
|
||||
as _i20.Future<dynamic>);
|
||||
as _i19.Future<dynamic>);
|
||||
|
||||
@override
|
||||
_i20.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
_i19.Future<List<dynamic>> fetchPaginated(Uri? uri) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchPaginated, [uri]),
|
||||
returnValue: _i20.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
returnValue: _i19.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
)
|
||||
as _i20.Future<List<dynamic>>);
|
||||
as _i19.Future<List<dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<Map<String, dynamic>> post(
|
||||
_i19.Future<Map<String, dynamic>> post(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#post, [data, uri]),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(
|
||||
returnValue: _i19.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i20.Future<Map<String, dynamic>>);
|
||||
as _i19.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<Map<String, dynamic>> patch(
|
||||
_i19.Future<Map<String, dynamic>> patch(
|
||||
Map<String, dynamic>? data,
|
||||
Uri? uri,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#patch, [data, uri]),
|
||||
returnValue: _i20.Future<Map<String, dynamic>>.value(
|
||||
returnValue: _i19.Future<Map<String, dynamic>>.value(
|
||||
<String, dynamic>{},
|
||||
),
|
||||
)
|
||||
as _i20.Future<Map<String, dynamic>>);
|
||||
as _i19.Future<Map<String, dynamic>>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i3.Response> deleteRequest(String? url, int? id) =>
|
||||
_i19.Future<_i3.Response> deleteRequest(String? url, int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
returnValue: _i20.Future<_i3.Response>.value(
|
||||
returnValue: _i19.Future<_i3.Response>.value(
|
||||
_FakeResponse_3(
|
||||
this,
|
||||
Invocation.method(#deleteRequest, [url, id]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i3.Response>);
|
||||
as _i19.Future<_i3.Response>);
|
||||
}
|
||||
|
||||
/// A class which mocks [ExercisesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
class MockExercisesProvider extends _i1.Mock implements _i20.ExercisesProvider {
|
||||
MockExercisesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -293,14 +306,6 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
)
|
||||
as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
List<_i6.Exercise> get filteredExercises =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.getter(#filteredExercises),
|
||||
returnValue: <_i6.Exercise>[],
|
||||
)
|
||||
as List<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
Map<int, List<_i6.Exercise>> get exerciseByVariation =>
|
||||
(super.noSuchMethod(
|
||||
@@ -353,12 +358,6 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set filteredExercises(List<_i6.Exercise>? newFilteredExercises) => super.noSuchMethod(
|
||||
Invocation.setter(#filteredExercises, newFilteredExercises),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
set languages(List<_i10.Language>? languages) => super.noSuchMethod(
|
||||
Invocation.setter(#languages, languages),
|
||||
@@ -369,30 +368,6 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
bool get hasListeners =>
|
||||
(super.noSuchMethod(Invocation.getter(#hasListeners), returnValue: false) as bool);
|
||||
|
||||
@override
|
||||
_i20.Future<void> setFilters(_i21.Filters? newFilters) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#setFilters, [newFilters]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
|
||||
@override
|
||||
void initFilters() => super.noSuchMethod(
|
||||
Invocation.method(#initFilters, []),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
_i20.Future<void> findByFilters() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#findByFilters, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
|
||||
@override
|
||||
void clear() => super.noSuchMethod(
|
||||
Invocation.method(#clear, []),
|
||||
@@ -470,60 +445,60 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
as _i10.Language);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetCategoriesFromApi() =>
|
||||
_i19.Future<void> fetchAndSetCategoriesFromApi() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetCategoriesFromApi, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetMusclesFromApi() =>
|
||||
_i19.Future<void> fetchAndSetMusclesFromApi() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetMusclesFromApi, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetEquipmentsFromApi() =>
|
||||
_i19.Future<void> fetchAndSetEquipmentsFromApi() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetEquipmentsFromApi, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetLanguagesFromApi() =>
|
||||
_i19.Future<void> fetchAndSetLanguagesFromApi() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetLanguagesFromApi, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetAllExercises() =>
|
||||
_i19.Future<void> fetchAndSetAllExercises() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllExercises, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) =>
|
||||
_i19.Future<_i6.Exercise?> fetchAndSetExercise(int? exerciseId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetExercise, [exerciseId]),
|
||||
returnValue: _i20.Future<_i6.Exercise?>.value(),
|
||||
returnValue: _i19.Future<_i6.Exercise?>.value(),
|
||||
)
|
||||
as _i20.Future<_i6.Exercise?>);
|
||||
as _i19.Future<_i6.Exercise?>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i6.Exercise> handleUpdateExerciseFromApi(
|
||||
_i19.Future<_i6.Exercise> handleUpdateExerciseFromApi(
|
||||
_i5.ExerciseDatabase? database,
|
||||
int? exerciseId,
|
||||
) =>
|
||||
@@ -532,7 +507,7 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
database,
|
||||
exerciseId,
|
||||
]),
|
||||
returnValue: _i20.Future<_i6.Exercise>.value(
|
||||
returnValue: _i19.Future<_i6.Exercise>.value(
|
||||
_FakeExercise_6(
|
||||
this,
|
||||
Invocation.method(#handleUpdateExerciseFromApi, [
|
||||
@@ -542,39 +517,39 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i6.Exercise>);
|
||||
as _i19.Future<_i6.Exercise>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
_i19.Future<void> initCacheTimesLocalPrefs({dynamic forceInit = false}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#initCacheTimesLocalPrefs, [], {
|
||||
#forceInit: forceInit,
|
||||
}),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> clearAllCachesAndPrefs() =>
|
||||
_i19.Future<void> clearAllCachesAndPrefs() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#clearAllCachesAndPrefs, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetInitialData() =>
|
||||
_i19.Future<void> fetchAndSetInitialData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetInitialData, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> setExercisesFromDatabase(
|
||||
_i19.Future<void> setExercisesFromDatabase(
|
||||
_i5.ExerciseDatabase? database, {
|
||||
bool? forceDeleteCache = false,
|
||||
}) =>
|
||||
@@ -584,82 +559,64 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
[database],
|
||||
{#forceDeleteCache: forceDeleteCache},
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) =>
|
||||
_i19.Future<void> updateExerciseCache(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#updateExerciseCache, [database]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) =>
|
||||
_i19.Future<void> fetchAndSetMuscles(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetMuscles, [database]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) =>
|
||||
_i19.Future<void> fetchAndSetCategories(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetCategories, [database]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) =>
|
||||
_i19.Future<void> fetchAndSetLanguages(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetLanguages, [database]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) =>
|
||||
_i19.Future<void> fetchAndSetEquipments(_i5.ExerciseDatabase? database) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetEquipments, [database]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<List<_i6.Exercise>> searchExercise(
|
||||
String? name, {
|
||||
String? languageCode = 'en',
|
||||
bool? searchEnglish = false,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#searchExercise,
|
||||
[name],
|
||||
{#languageCode: languageCode, #searchEnglish: searchEnglish},
|
||||
),
|
||||
returnValue: _i20.Future<List<_i6.Exercise>>.value(
|
||||
<_i6.Exercise>[],
|
||||
),
|
||||
)
|
||||
as _i20.Future<List<_i6.Exercise>>);
|
||||
|
||||
@override
|
||||
void addListener(_i22.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i21.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@@ -680,7 +637,7 @@ class MockExercisesProvider extends _i1.Mock implements _i21.ExercisesProvider {
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i22.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -820,26 +777,26 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i19.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i19.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> setExercisesAndUnits(
|
||||
List<_i24.DayData>? entries, {
|
||||
_i19.Future<void> setExercisesAndUnits(
|
||||
List<_i23.DayData>? entries, {
|
||||
Map<int, _i6.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
@@ -848,208 +805,208 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i13.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i19.Future<_i13.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i20.Future<_i13.Routine>.value(
|
||||
returnValue: _i19.Future<_i13.Routine>.value(
|
||||
_FakeRoutine_13(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i13.Routine>);
|
||||
as _i19.Future<_i13.Routine>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i13.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i19.Future<_i13.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i20.Future<_i13.Routine>.value(
|
||||
returnValue: _i19.Future<_i13.Routine>.value(
|
||||
_FakeRoutine_13(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i13.Routine>);
|
||||
as _i19.Future<_i13.Routine>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i13.Routine> addRoutine(_i13.Routine? routine) =>
|
||||
_i19.Future<_i13.Routine> addRoutine(_i13.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i20.Future<_i13.Routine>.value(
|
||||
returnValue: _i19.Future<_i13.Routine>.value(
|
||||
_FakeRoutine_13(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i13.Routine>);
|
||||
as _i19.Future<_i13.Routine>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editRoutine(_i13.Routine? routine) =>
|
||||
_i19.Future<void> editRoutine(_i13.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteRoutine(int? id) =>
|
||||
_i19.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i19.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i19.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> fetchAndSetUnits() =>
|
||||
_i19.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i14.Day> addDay(_i14.Day? day) =>
|
||||
_i19.Future<_i14.Day> addDay(_i14.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i20.Future<_i14.Day>.value(
|
||||
returnValue: _i19.Future<_i14.Day>.value(
|
||||
_FakeDay_14(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i14.Day>);
|
||||
as _i19.Future<_i14.Day>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editDay(_i14.Day? day) =>
|
||||
_i19.Future<void> editDay(_i14.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editDays(List<_i14.Day>? days) =>
|
||||
_i19.Future<void> editDays(List<_i14.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteDay(int? dayId) =>
|
||||
_i19.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i15.Slot> addSlot(_i15.Slot? slot, int? routineId) =>
|
||||
_i19.Future<_i15.Slot> addSlot(_i15.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i20.Future<_i15.Slot>.value(
|
||||
returnValue: _i19.Future<_i15.Slot>.value(
|
||||
_FakeSlot_15(
|
||||
this,
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i15.Slot>);
|
||||
as _i19.Future<_i15.Slot>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i19.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editSlot(_i15.Slot? slot, int? routineId) =>
|
||||
_i19.Future<void> editSlot(_i15.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editSlots(List<_i15.Slot>? slots, int? routineId) =>
|
||||
_i19.Future<void> editSlots(List<_i15.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i16.SlotEntry> addSlotEntry(
|
||||
_i19.Future<_i16.SlotEntry> addSlotEntry(
|
||||
_i16.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i20.Future<_i16.SlotEntry>.value(
|
||||
returnValue: _i19.Future<_i16.SlotEntry>.value(
|
||||
_FakeSlotEntry_16(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i16.SlotEntry>);
|
||||
as _i19.Future<_i16.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i19.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> editSlotEntry(_i16.SlotEntry? entry, int? routineId) =>
|
||||
_i19.Future<void> editSlotEntry(_i16.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i16.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i25.dummyValue<String>(
|
||||
returnValue: _i24.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -1057,125 +1014,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i23.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i20.Future<_i17.BaseConfig> editConfig(
|
||||
_i19.Future<_i17.BaseConfig> editConfig(
|
||||
_i17.BaseConfig? config,
|
||||
_i16.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i20.Future<_i17.BaseConfig>.value(
|
||||
returnValue: _i19.Future<_i17.BaseConfig>.value(
|
||||
_FakeBaseConfig_17(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i17.BaseConfig>);
|
||||
as _i19.Future<_i17.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i17.BaseConfig> addConfig(
|
||||
_i19.Future<_i17.BaseConfig> addConfig(
|
||||
_i17.BaseConfig? config,
|
||||
_i16.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i20.Future<_i17.BaseConfig>.value(
|
||||
returnValue: _i19.Future<_i17.BaseConfig>.value(
|
||||
_FakeBaseConfig_17(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i17.BaseConfig>);
|
||||
as _i19.Future<_i17.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteConfig(int? id, _i16.ConfigType? type) =>
|
||||
_i19.Future<void> deleteConfig(int? id, _i16.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> handleConfig(
|
||||
_i19.Future<void> handleConfig(
|
||||
_i16.SlotEntry? entry,
|
||||
num? value,
|
||||
_i16.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
_i20.Future<List<_i18.WorkoutSession>> fetchSessionData() =>
|
||||
_i19.Future<List<_i18.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i20.Future<List<_i18.WorkoutSession>>.value(
|
||||
returnValue: _i19.Future<List<_i18.WorkoutSession>>.value(
|
||||
<_i18.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i20.Future<List<_i18.WorkoutSession>>);
|
||||
as _i19.Future<List<_i18.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i18.WorkoutSession> addSession(
|
||||
_i19.Future<_i18.WorkoutSession> addSession(
|
||||
_i18.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i20.Future<_i18.WorkoutSession>.value(
|
||||
returnValue: _i19.Future<_i18.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_18(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i18.WorkoutSession>);
|
||||
as _i19.Future<_i18.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i18.WorkoutSession> editSession(_i18.WorkoutSession? session) =>
|
||||
_i19.Future<_i18.WorkoutSession> editSession(_i18.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i20.Future<_i18.WorkoutSession>.value(
|
||||
returnValue: _i19.Future<_i18.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_18(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i18.WorkoutSession>);
|
||||
as _i19.Future<_i18.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i20.Future<_i19.Log> addLog(_i19.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i20.Future<_i19.Log>.value(
|
||||
_FakeLog_19(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i20.Future<_i19.Log>);
|
||||
|
||||
@override
|
||||
_i20.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i19.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i20.Future<void>.value(),
|
||||
returnValueForMissingStub: _i20.Future<void>.value(),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
)
|
||||
as _i20.Future<void>);
|
||||
as _i19.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i22.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i21.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i22.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i21.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/gym_mode_session_screen_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/repetition_unit_form_widget_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/routine_edit_screen_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/routine_edit_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/routine_form_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/routine_logs_screen_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/slot_entry_form_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,18 +1,35 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Mocks generated by Mockito 5.4.6 from annotations
|
||||
// in wger/test/routine/weight_unit_form_widget_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i13;
|
||||
import 'dart:ui' as _i17;
|
||||
import 'dart:async' as _i12;
|
||||
import 'dart:ui' as _i16;
|
||||
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:mockito/src/dummies.dart' as _i16;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i15;
|
||||
import 'package:mockito/src/dummies.dart' as _i15;
|
||||
import 'package:wger/models/exercises/exercise.dart' as _i14;
|
||||
import 'package:wger/models/workouts/base_config.dart' as _i9;
|
||||
import 'package:wger/models/workouts/day.dart' as _i6;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i14;
|
||||
import 'package:wger/models/workouts/log.dart' as _i11;
|
||||
import 'package:wger/models/workouts/day_data.dart' as _i13;
|
||||
import 'package:wger/models/workouts/repetition_unit.dart' as _i4;
|
||||
import 'package:wger/models/workouts/routine.dart' as _i5;
|
||||
import 'package:wger/models/workouts/session.dart' as _i10;
|
||||
@@ -20,7 +37,7 @@ import 'package:wger/models/workouts/slot.dart' as _i7;
|
||||
import 'package:wger/models/workouts/slot_entry.dart' as _i8;
|
||||
import 'package:wger/models/workouts/weight_unit.dart' as _i3;
|
||||
import 'package:wger/providers/base_provider.dart' as _i2;
|
||||
import 'package:wger/providers/routines.dart' as _i12;
|
||||
import 'package:wger/providers/routines.dart' as _i11;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
@@ -75,14 +92,10 @@ class _FakeWorkoutSession_8 extends _i1.SmartFake implements _i10.WorkoutSession
|
||||
: super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
class _FakeLog_9 extends _i1.SmartFake implements _i11.Log {
|
||||
_FakeLog_9(Object parent, Invocation parentInvocation) : super(parent, parentInvocation);
|
||||
}
|
||||
|
||||
/// A class which mocks [RoutinesProvider].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
class MockRoutinesProvider extends _i1.Mock implements _i11.RoutinesProvider {
|
||||
MockRoutinesProvider() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
@@ -222,27 +235,27 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as int);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesFull() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesFull, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
_i12.Future<void> fetchAndSetAllRoutinesSparse() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetAllRoutinesSparse, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> setExercisesAndUnits(
|
||||
List<_i14.DayData>? entries, {
|
||||
Map<int, _i15.Exercise>? exercises,
|
||||
_i12.Future<void> setExercisesAndUnits(
|
||||
List<_i13.DayData>? entries, {
|
||||
Map<int, _i14.Exercise>? exercises,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
@@ -250,205 +263,205 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
[entries],
|
||||
{#exercises: exercises},
|
||||
),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineSparse(int? planId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineSparse, [planId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
_i12.Future<_i5.Routine> fetchAndSetRoutineFull(int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(
|
||||
this,
|
||||
Invocation.method(#fetchAndSetRoutineFull, [routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<_i5.Routine> addRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addRoutine, [routine]),
|
||||
returnValue: _i13.Future<_i5.Routine>.value(
|
||||
returnValue: _i12.Future<_i5.Routine>.value(
|
||||
_FakeRoutine_3(this, Invocation.method(#addRoutine, [routine])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i5.Routine>);
|
||||
as _i12.Future<_i5.Routine>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
_i12.Future<void> editRoutine(_i5.Routine? routine) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editRoutine, [routine]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteRoutine(int? id) =>
|
||||
_i12.Future<void> deleteRoutine(int? id) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteRoutine, [id]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
_i12.Future<void> fetchAndSetRepetitionUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetRepetitionUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetWeightUnits() =>
|
||||
_i12.Future<void> fetchAndSetWeightUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetWeightUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> fetchAndSetUnits() =>
|
||||
_i12.Future<void> fetchAndSetUnits() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchAndSetUnits, []),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
_i12.Future<_i6.Day> addDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addDay, [day]),
|
||||
returnValue: _i13.Future<_i6.Day>.value(
|
||||
returnValue: _i12.Future<_i6.Day>.value(
|
||||
_FakeDay_4(this, Invocation.method(#addDay, [day])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i6.Day>);
|
||||
as _i12.Future<_i6.Day>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDay(_i6.Day? day) =>
|
||||
_i12.Future<void> editDay(_i6.Day? day) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDay, [day]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
_i12.Future<void> editDays(List<_i6.Day>? days) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editDays, [days]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteDay(int? dayId) =>
|
||||
_i12.Future<void> deleteDay(int? dayId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteDay, [dayId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<_i7.Slot> addSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<_i7.Slot>.value(
|
||||
returnValue: _i12.Future<_i7.Slot>.value(
|
||||
_FakeSlot_5(this, Invocation.method(#addSlot, [slot, routineId])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i7.Slot>);
|
||||
as _i12.Future<_i7.Slot>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
_i12.Future<void> deleteSlot(int? slotId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlot, [slotId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
_i12.Future<void> editSlot(_i7.Slot? slot, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlot, [slot, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
_i12.Future<void> editSlots(List<_i7.Slot>? slots, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlots, [slots, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i12.Future<_i8.SlotEntry> addSlotEntry(
|
||||
_i8.SlotEntry? entry,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<_i8.SlotEntry>.value(
|
||||
returnValue: _i12.Future<_i8.SlotEntry>.value(
|
||||
_FakeSlotEntry_6(
|
||||
this,
|
||||
Invocation.method(#addSlotEntry, [entry, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i8.SlotEntry>);
|
||||
as _i12.Future<_i8.SlotEntry>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
_i12.Future<void> deleteSlotEntry(int? id, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteSlotEntry, [id, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
_i12.Future<void> editSlotEntry(_i8.SlotEntry? entry, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSlotEntry, [entry, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
String getConfigUrl(_i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
returnValue: _i16.dummyValue<String>(
|
||||
returnValue: _i15.dummyValue<String>(
|
||||
this,
|
||||
Invocation.method(#getConfigUrl, [type]),
|
||||
),
|
||||
@@ -456,125 +469,115 @@ class MockRoutinesProvider extends _i1.Mock implements _i12.RoutinesProvider {
|
||||
as String);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> editConfig(
|
||||
_i12.Future<_i9.BaseConfig> editConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#editConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i9.BaseConfig> addConfig(
|
||||
_i12.Future<_i9.BaseConfig> addConfig(
|
||||
_i9.BaseConfig? config,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
returnValue: _i13.Future<_i9.BaseConfig>.value(
|
||||
returnValue: _i12.Future<_i9.BaseConfig>.value(
|
||||
_FakeBaseConfig_7(
|
||||
this,
|
||||
Invocation.method(#addConfig, [config, type]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i9.BaseConfig>);
|
||||
as _i12.Future<_i9.BaseConfig>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
_i12.Future<void> deleteConfig(int? id, _i8.ConfigType? type) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteConfig, [id, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> handleConfig(
|
||||
_i12.Future<void> handleConfig(
|
||||
_i8.SlotEntry? entry,
|
||||
num? value,
|
||||
_i8.ConfigType? type,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#handleConfig, [entry, value, type]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
_i13.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
_i12.Future<List<_i10.WorkoutSession>> fetchSessionData() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#fetchSessionData, []),
|
||||
returnValue: _i13.Future<List<_i10.WorkoutSession>>.value(
|
||||
returnValue: _i12.Future<List<_i10.WorkoutSession>>.value(
|
||||
<_i10.WorkoutSession>[],
|
||||
),
|
||||
)
|
||||
as _i13.Future<List<_i10.WorkoutSession>>);
|
||||
as _i12.Future<List<_i10.WorkoutSession>>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> addSession(
|
||||
_i12.Future<_i10.WorkoutSession> addSession(
|
||||
_i10.WorkoutSession? session,
|
||||
int? routineId,
|
||||
) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#addSession, [session, routineId]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
_i12.Future<_i10.WorkoutSession> editSession(_i10.WorkoutSession? session) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#editSession, [session]),
|
||||
returnValue: _i13.Future<_i10.WorkoutSession>.value(
|
||||
returnValue: _i12.Future<_i10.WorkoutSession>.value(
|
||||
_FakeWorkoutSession_8(
|
||||
this,
|
||||
Invocation.method(#editSession, [session]),
|
||||
),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i10.WorkoutSession>);
|
||||
as _i12.Future<_i10.WorkoutSession>);
|
||||
|
||||
@override
|
||||
_i13.Future<_i11.Log> addLog(_i11.Log? log) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#addLog, [log]),
|
||||
returnValue: _i13.Future<_i11.Log>.value(
|
||||
_FakeLog_9(this, Invocation.method(#addLog, [log])),
|
||||
),
|
||||
)
|
||||
as _i13.Future<_i11.Log>);
|
||||
|
||||
@override
|
||||
_i13.Future<void> deleteLog(int? logId, int? routineId) =>
|
||||
_i12.Future<void> deleteLog(String? logId, int? routineId) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(#deleteLog, [logId, routineId]),
|
||||
returnValue: _i13.Future<void>.value(),
|
||||
returnValueForMissingStub: _i13.Future<void>.value(),
|
||||
returnValue: _i12.Future<void>.value(),
|
||||
returnValueForMissingStub: _i12.Future<void>.value(),
|
||||
)
|
||||
as _i13.Future<void>);
|
||||
as _i12.Future<void>);
|
||||
|
||||
@override
|
||||
void addListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void addListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#addListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@override
|
||||
void removeListener(_i17.VoidCallback? listener) => super.noSuchMethod(
|
||||
void removeListener(_i16.VoidCallback? listener) => super.noSuchMethod(
|
||||
Invocation.method(#removeListener, [listener]),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*
|
||||
* This file is part of wger Workout Manager <https://github.com/wger-project>.
|
||||
* Copyright (C) 2020, 2021 wger Team
|
||||
* Copyright (c) 2020, wger Team
|
||||
*
|
||||
* wger Workout Manager is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wger Workout Manager is distributed in the hope that it will be useful,
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
@@ -45,41 +45,44 @@ const testRepetitionUnits = [testRepetitionUnit1, testRepetitionUnit2];
|
||||
Routine getTestRoutine({List<Exercise>? exercises}) {
|
||||
final testExercises = exercises ?? getTestExercises();
|
||||
|
||||
final log1 = Log.empty()
|
||||
..id = 1
|
||||
..iteration = 2
|
||||
..slotEntryId = 3
|
||||
..weight = 10
|
||||
..rir = 1.5
|
||||
..date = DateTime(2021, 5, 1)
|
||||
..repetitions = 10
|
||||
..routineId = 1;
|
||||
final log1 = Log(
|
||||
id: '1',
|
||||
iteration: 2,
|
||||
slotEntryId: 3,
|
||||
weight: 10,
|
||||
rir: 1.5,
|
||||
date: DateTime(2021, 5, 1),
|
||||
repetitions: 10,
|
||||
routineId: 1,
|
||||
);
|
||||
log1.exerciseBase = testExercises[0];
|
||||
log1.weightUnit = testWeightUnit1;
|
||||
log1.repetitionUnit = testRepetitionUnit1;
|
||||
|
||||
final log2 = Log.empty()
|
||||
..id = 2
|
||||
..iteration = 4
|
||||
..slotEntryId = 1
|
||||
..weight = 10
|
||||
..rir = 2
|
||||
..date = DateTime(2021, 5, 1)
|
||||
..repetitions = 12
|
||||
..routineId = 1;
|
||||
final log2 = Log(
|
||||
id: '2',
|
||||
iteration: 4,
|
||||
slotEntryId: 1,
|
||||
weight: 10,
|
||||
rir: 2,
|
||||
date: DateTime(2021, 5, 1),
|
||||
repetitions: 12,
|
||||
routineId: 1,
|
||||
);
|
||||
log2.exerciseBase = testExercises[0];
|
||||
log2.weightUnit = testWeightUnit1;
|
||||
log2.repetitionUnit = testRepetitionUnit1;
|
||||
|
||||
final log3 = Log.empty()
|
||||
..id = 3
|
||||
..iteration = 5
|
||||
..slotEntryId = 1
|
||||
..weight = 50
|
||||
..rir = null
|
||||
..date = DateTime(2021, 5, 2)
|
||||
..repetitions = 8
|
||||
..routineId = 1;
|
||||
final log3 = Log(
|
||||
id: '3',
|
||||
iteration: 5,
|
||||
slotEntryId: 1,
|
||||
weight: 50,
|
||||
rir: null,
|
||||
date: DateTime(2021, 5, 2),
|
||||
repetitions: 8,
|
||||
routineId: 1,
|
||||
);
|
||||
log3.exerciseBase = testExercises[1];
|
||||
log3.weightUnit = testWeightUnit1;
|
||||
log3.repetitionUnit = testRepetitionUnit1;
|
||||
|
||||
Reference in New Issue
Block a user