Issue I got stuck on making the test using Mockito. I’m trying to implement Clean Architect to the Flutter tutorial https://docs.flutter.dev/get-started/codelab. I’ve made a use case called GetRandomWords and an interface-adapter called RandomWordsRepository like so: abstract class RandomWordsRepository { String
Continue readingTag: tdd
How to test the effect of FirebaseAuth.instance.signOut() that should make FirebaseAuth.instance.userChanges() invoke its listener?
Issue I’m trying to write the code of the ApplicationState in Get to know Firebase for Flutter codelab while practicing Test Driven Development. The method signOut in the codelab should be like this: void signOut() { // The question is
Continue readingShould we source control the .mocks.dart files created by build_runner for mockito
Issue Because of null safety in dart, we had to update our codes test. We are using mockito for mocking the dependecies for the given class. As per their docs, we decided to use the build_runner method to generate Mock
Continue readingShould we source control the .mocks.dart files created by build_runner for mockito
Issue Because of null safety in dart, we had to update our codes test. We are using mockito for mocking the dependecies for the given class. As per their docs, we decided to use the build_runner method to generate Mock
Continue readingBest Approach To Testing App Appearance In Flutter While App Is In Dark/Light Theme (especially for Dark Theme)
Issue After going through the Flutter docs on testing, I have come to a point in my app where I would like to test both light and dark theme appearance on the app. Integration tests could be an option, however
Continue readingHow to handle global things with Clean Architecture in Flutter apps?
Issue I have completed Reso Coder tutorial about Clean Architecture with TDD in Flutter Apps. But there are two points interesting for me: If we have global widgets like Loading, Failure, Empty Case and so on, in which layer and
Continue reading'Null' is not a subtype of type 'Future<Either<Failure, NumberTrivia>>'
Issue I am implementing the flutter project in TDD Clean Architecture by following this video: https://www.youtube.com/watch?v=lPkWX8xFthE&t=1s my code: class MockNumberTriviaRepository extends Mock implements NumberTriviaRepository {} void main() { late MockNumberTriviaRepository mockNumberTriviaRepository; late GetConcreteNumberTrivia usecase; setUp(() { mockNumberTriviaRepository = MockNumberTriviaRepository(); usecase
Continue reading