Test Name Convention (ARCH8008)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key kotlin.naming.test-name-convention · Severity info · Category naming
Flags @Test functions with non-descriptive names (test1, foo) - a test name should state the behaviour under test.
Incorrect
Section titled “Incorrect”@Test fun test1() { }@Test fun foo() { }Correct
Section titled “Correct”@Test fun `returns empty list when no orders exist`() { }@Test fun savesOrderWhenValid() { }Name the test after the behaviour: does X when Y, or camelCase with at least three words.