From 4a0cda32687157b599761ccb717187950af07ca7 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Fri, 16 Sep 2022 16:31:45 +0100 Subject: [PATCH] formatting tweaks --- docs/unit_testing.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/unit_testing.md b/docs/unit_testing.md index d879ba18e7..5643e9709c 100644 --- a/docs/unit_testing.md +++ b/docs/unit_testing.md @@ -2,8 +2,8 @@ -* [Overview](#project-conventions) - * [Best Practices](#best-practices) +* [Overview](#overview) + * [Best Practices](#best-practices) * [Project Conventions](#project-conventions) * [Setup](#setup) * [Naming](#naming) @@ -13,10 +13,9 @@ * [Mocking](#mocking) * [Fakes](#fakes) * [Fixtures](#fixtures) -* [Examples](#examples) - * [Simple](#extensions-used-to-streamline-the-test-setup) - * [Fakes and Fixtures](#fakes-and-fixtures) - * [ViewModel](#viewmodel) + * [Examples](#examples) + * [Extensions used to streamline the test setup](#extensions-used-to-streamline-the-test-setup) + * [Fakes and Fixtures](#fakes-and-fixtures) @@ -65,11 +64,11 @@ class MyClassTest { #### 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"_ - `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"_ -- 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 @Test