formatting tweaks
This commit is contained in:
parent
1b3e099d7c
commit
4a0cda3268
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
<!--- TOC -->
|
<!--- TOC -->
|
||||||
|
|
||||||
* [Overview](#project-conventions)
|
* [Overview](#overview)
|
||||||
* [Best Practices](#best-practices)
|
* [Best Practices](#best-practices)
|
||||||
* [Project Conventions](#project-conventions)
|
* [Project Conventions](#project-conventions)
|
||||||
* [Setup](#setup)
|
* [Setup](#setup)
|
||||||
* [Naming](#naming)
|
* [Naming](#naming)
|
||||||
@ -13,10 +13,9 @@
|
|||||||
* [Mocking](#mocking)
|
* [Mocking](#mocking)
|
||||||
* [Fakes](#fakes)
|
* [Fakes](#fakes)
|
||||||
* [Fixtures](#fixtures)
|
* [Fixtures](#fixtures)
|
||||||
* [Examples](#examples)
|
* [Examples](#examples)
|
||||||
* [Simple](#extensions-used-to-streamline-the-test-setup)
|
* [Extensions used to streamline the test setup](#extensions-used-to-streamline-the-test-setup)
|
||||||
* [Fakes and Fixtures](#fakes-and-fixtures)
|
* [Fakes and Fixtures](#fakes-and-fixtures)
|
||||||
* [ViewModel](#viewmodel)
|
|
||||||
|
|
||||||
<!--- END -->
|
<!--- END -->
|
||||||
|
|
||||||
@ -65,11 +64,11 @@ class MyClassTest {
|
|||||||
|
|
||||||
#### Naming
|
#### Naming
|
||||||
|
|
||||||
- Test names use the `Gherkin` format, `given, when, then`mapping to the input, logic under test and expected result.
|
- Test names use the `Gherkin` format, `given, when, then` mapping to the input, logic under test and expected result.
|
||||||
- `given` - Uniqueness about the environment or dependencies in which the test case is running. _"given device is android 12 and supports dark mode"_
|
- `given` - Uniqueness about the environment or dependencies in which the test case is running. _"given device is android 12 and supports dark mode"_
|
||||||
- `when` - The action/function under test. _"when reading dark mode status"_
|
- `when` - The action/function under test. _"when reading dark mode status"_
|
||||||
- `then` - The expected result from the combination of _given_ and _when_. _"then returns dark mode enabled"_
|
- `then` - The expected result from the combination of _given_ and _when_. _"then returns dark mode enabled"_
|
||||||
- Test names are written using kotlin back ticks to enable _sentences _ish_.
|
- Test names are written using kotlin back ticks to enable sentences _ish_.
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user