This file contains hidden or 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
| abstract class AuthRepository { | |
| Future<Either<Failure, Session>> login( | |
| {required String email, required String password}); | |
| } | |
| class AuthRepositoryImpl implements AuthRepository { | |
| const AuthRepositoryImpl(this.account); | |
| final Account account; | |
| @override |
This file contains hidden or 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
| @GenerateMocks([Account]) | |
| void main() { | |
| /// Setup dependencies for the repo | |
| late MockAccount _mockAccount; | |
| late AuthRepositoryImpl _repository; | |
| setUp((){ | |
| _mockAccount = MockAccount(); | |
| _repository = AuthRepositoryImpl(_mockAccount); | |
| }); |
This file contains hidden or 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
| import 'package:appwrite/appwrite.dart'; | |
| @GenerateMocks([Account]) | |
| void main() { | |
| ... | |
| } |
This file contains hidden or 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
| Widget _makeTestableWidget(Widget body) { | |
| return ChangeNotifierProvider<MovieDetailNotifier>.value( | |
| value: mockNotifier, | |
| child: MaterialApp( | |
| home: body, | |
| ), | |
| ); | |
| } |
This file contains hidden or 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
| { | |
| "coord": { | |
| "lon": 106.8451, | |
| "lat": -6.2146 | |
| }, | |
| "weather": [ | |
| { | |
| "id": 801, | |
| "main": "Clouds", | |
| "description": "few clouds", |
This file contains hidden or 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
| . | Unit | Widget | Integration | |
|---|---|---|---|---|
| Tingkat Percaya Diri | Rendah | Sedang | Tinggi | |
| Biaya | Rendah | Sedang | Tinggi | |
| Kebergantungan (Dependencies) | Sedikit | Sedang | Banyak | |
| Kecepatan | Cepat | Cepat | Lambat |
This file contains hidden or 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
| import 'package:flutter_test/flutter_test.dart'; | |
| import 'package:integration_test/integration_test.dart'; | |
| import 'package:ditonton/main.dart' as app; | |
| void main() { | |
| IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | |
| HomeRobot homeRobot; | |
| ... |
This file contains hidden or 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
| return Scaffold( | |
| ... | |
| leading: IconButton( | |
| key: const Key('drawerButton'), | |
| icon: const Icon(Icons.menu), | |
| splashRadius: 20.0, | |
| onPressed: toggle, | |
| ), | |
| ... | |
| ); |
This file contains hidden or 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
| import 'package:flutter/material.dart'; | |
| import 'package:flutter_test/flutter_test.dart'; | |
| class HomeRobot { | |
| final WidgetTester tester; | |
| HomeRobot(this.tester); | |
| Future<void> clickNavigationDrawerButton() async { | |
| final drawerButtonFinder = find.byKey(Key('drawerButton')); |
This file contains hidden or 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
| @GenerateMocks([MovieDetailNotifier]) | |
| void main() { | |
| late MockMovieDetailNotifier mockNotifier; | |
| setUp(() { | |
| mockNotifier = MockMovieDetailNotifier(); | |
| }); | |
| Widget _makeTestableWidget(Widget body) { | |
| return ChangeNotifierProvider<MovieDetailNotifier>.value( |