-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from FlutterFriends/brylie/refactor-diversity-s…
…core Refactor workout diversity score calculation
- Loading branch information
Showing
10 changed files
with
198 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,42 @@ | ||
import 'package:mockito/annotations.dart'; | ||
import 'package:mockito/mockito.dart'; | ||
import 'package:random_workout/providers/app_state.dart'; | ||
// import 'package:random_workout/models/exercise.dart'; | ||
import 'package:random_workout/models/exercise.dart'; | ||
|
||
@GenerateNiceMocks([MockSpec<AppState>()]) | ||
void main() {} | ||
class MockAppState extends Mock implements AppState { | ||
@override | ||
bool get isDarkMode => super.noSuchMethod( | ||
Invocation.getter(#isDarkMode), | ||
returnValue: true, | ||
returnValueForMissingStub: true, | ||
); | ||
|
||
@override | ||
List<Exercise> get currentWorkout => super.noSuchMethod( | ||
Invocation.getter(#currentWorkout), | ||
returnValue: <Exercise>[], | ||
returnValueForMissingStub: <Exercise>[], | ||
); | ||
|
||
@override | ||
int get workoutDiversityScore => super.noSuchMethod( | ||
Invocation.getter(#workoutDiversityScore), | ||
returnValue: 0, | ||
returnValueForMissingStub: 0, | ||
); | ||
|
||
@override | ||
Map<String, List<MapEntry<dynamic, int>>> getGroupedTargetCounts() => | ||
super.noSuchMethod( | ||
Invocation.method(#getGroupedTargetCounts, []), | ||
returnValue: <String, List<MapEntry<dynamic, int>>>{ | ||
'Muscles': [], | ||
'Joints': [], | ||
'Focus Areas': [], | ||
}, | ||
returnValueForMissingStub: <String, List<MapEntry<dynamic, int>>>{ | ||
'Muscles': [], | ||
'Joints': [], | ||
'Focus Areas': [], | ||
}, | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.