-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator/DisplayNameTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2015-2019 the original author or authors. | ||
* | ||
* All rights reserved. This program and the accompanying materials are | ||
* made available under the terms of the Eclipse Public License v2.0 which | ||
* accompanies this distribution and is available at | ||
* | ||
* http://www.eclipse.org/legal/epl-v20.html | ||
*/ | ||
@file:Suppress("unused") | ||
|
||
package org.junit.jupiter.params.aggregator | ||
|
||
import org.junit.jupiter.api.Assertions.assertEquals | ||
import org.junit.jupiter.api.TestInfo | ||
import org.junit.jupiter.params.ParameterizedTest | ||
import org.junit.jupiter.params.provider.MethodSource | ||
|
||
// https://github.com/junit-team/junit5/issues/1836 | ||
object DisplayNameTests { | ||
@JvmStatic | ||
fun data() = arrayOf( | ||
arrayOf("A", 1), | ||
arrayOf("B", 2), | ||
arrayOf("C", 3) | ||
) | ||
|
||
@ParameterizedTest | ||
@MethodSource("data") | ||
fun test(char: String, number: Int, info: TestInfo) { | ||
assertEquals("[$number] $char, $number", info.displayName) | ||
} | ||
} |