Ir al contenido

Test Name Convention (ARCH8008)

Esta página aún no está disponible en tu idioma.

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.

@Test fun test1() { }
@Test fun foo() { }
@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.