/flutter_test

demo for unit test, widget test and integration test

Primary LanguageHTML

Flutter test

Basic

  1. Concepts

    • Unit test

      A unit test tests a single function, method, or class.

      • example

Assignment:

write unit test and widget test and intergration test for counter demo	

  1. Bloc test

    https://bloclibrary.dev/#/testing

    https://blog.codemagic.io/flutter-unit-testing-bloc-with-codemagic/

  2. Introduce Mockito library

    Monk: stub

    Fake: override

    https://pub.dev/packages/mockito

  3. Library test

    https://github.com/brianegan/flutter_architecture_samples/tree/master/todos_repository_simple

  4. TDD example

    https://resocoder.com/category/tutorials/flutter/tdd-clean-architecture/

  5. mobile 2.0 example

Assignment:

write bloc test for the following project

https://bloclibrary.dev/#/fluttertimertutorial

Code coverage:

1. 100%
  1. mockito mock ticker

Error testing

[How do you unittest exceptions in Dart?](