Aller au contenu

Test Name Convention (ARCH9008)

Ce contenu n’est pas encore disponible dans votre langue.

Key swift.naming.test-name-convention · Severity info · Category naming

Flags XCTestCase methods that do not start with test (never discovered) or say nothing about the behaviour (test1).

final class OrderTests: XCTestCase {
func savesOrder() {}
func test1() {}
}
final class OrderTests: XCTestCase {
func testSavesOrderWhenValid() {}
}

Name tests test + behaviour; XCTest only runs methods starting with test.