Loading topic
Future, and basic Flutter tests with flutter_test. You should also understand dependency injection, which means passing a class's collaborators into its constructor instead of creating them inside the class.2 min readFuture, basic tests, and Flutter's testWidgets workflow. This chapter focuses on dependency injection, which is the design step that makes mocking possible.2 min readFuture, and basic flutter_test tests. You should also be comfortable passing a dependency through a constructor.2 min readFuture, and basic flutter_test tests. It also assumes you have added mocktail and created a mock class. A stub is a rule that tells a mock what to return when a method is called.2 min readFuture, Stream, async and await, and basic flutter_test tests. It also assumes you can pass a repository into a class through its constructor.1 min readFuture, flutter_test, constructor-based dependency injection, and how to create a mocktail mock. The previous chapter introduced stubbing. Here, you will check whether the code under test called its dependency correctly.2 min readFuture, async and await, and basic flutter_test tests. You should also know how to pass a dependency through a constructor and how to create a Mock class with mocktail.2 min readFuture, setUp, expect, and basic mocktail stubbing. You will learn how to inspect the exact values that production code sends to a mocked dependency.2 min readFuture, Stream, flutter_test, and constructor-based dependency injection. It also assumes that you have created mocktail mocks and can stub methods with when.2 min readFuture, async and await, basic Flutter widgets, and the testWidgets and WidgetTester APIs.2 min readFuture, Stream, flutter_test, widget tests, and constructor-based dependency injection. This chapter focuses on choosing a test double. A test double is an object that replaces a real dependency during a test.2 min readFuture, Stream, flutter_test, constructor injection, and the basic mocktail flow of creating a mock, stubbing a call, and verifying an interaction. This chapter focuses on failures that often look mysterious but usually point to one specific problem.2 min read