mocked audio provider for workout provider test
parent
58ce7fdb0e
commit
7985e3bd1d
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:audioplayers/audioplayers.dart';
|
||||||
|
import 'package:smoke_cess_app/providers/audio_provider.dart';
|
||||||
|
|
||||||
|
class AudioProviderMock extends AudioProvider {
|
||||||
|
@override
|
||||||
|
bool get isMuted => true;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void stop() {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void playFinishSound() {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void mutePlayer() {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void unMutePlayer() {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void playSourceAfterBeep(AssetSource source) {}
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import 'package:smoke_cess_app/providers/audio_provider.dart';
|
||||||
import 'package:smoke_cess_app/providers/timer_provider.dart';
|
import 'package:smoke_cess_app/providers/timer_provider.dart';
|
||||||
import 'package:smoke_cess_app/providers/workout_provider.dart';
|
import 'package:smoke_cess_app/providers/workout_provider.dart';
|
||||||
import 'package:smoke_cess_app/globals.dart' as globals;
|
import 'package:smoke_cess_app/globals.dart' as globals;
|
||||||
|
import '../mock/audio_provider_mock.dart';
|
||||||
import '../mock/db_mock.dart';
|
import '../mock/db_mock.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
@ -16,7 +17,7 @@ void main() {
|
||||||
|
|
||||||
setUp(() {
|
setUp(() {
|
||||||
timerProvider = TimerProvider();
|
timerProvider = TimerProvider();
|
||||||
audioProvider = AudioProvider();
|
audioProvider = AudioProviderMock();
|
||||||
workoutProvider = WorkoutProvider(timerProvider, audioProvider);
|
workoutProvider = WorkoutProvider(timerProvider, audioProvider);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue