File tree 1 file changed +33
-0
lines changed
junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2015-2019 the original author or authors.
3
+ *
4
+ * All rights reserved. This program and the accompanying materials are
5
+ * made available under the terms of the Eclipse Public License v2.0 which
6
+ * accompanies this distribution and is available at
7
+ *
8
+ * http://www.eclipse.org/legal/epl-v20.html
9
+ */
10
+ @file:Suppress(" unused" )
11
+
12
+ package org.junit.jupiter.params.aggregator
13
+
14
+ import org.junit.jupiter.api.Assertions.assertEquals
15
+ import org.junit.jupiter.api.TestInfo
16
+ import org.junit.jupiter.params.ParameterizedTest
17
+ import org.junit.jupiter.params.provider.MethodSource
18
+
19
+ // https://github.com/junit-team/junit5/issues/1836
20
+ object DisplayNameTests {
21
+ @JvmStatic
22
+ fun data () = arrayOf(
23
+ arrayOf(" A" , 1 ),
24
+ arrayOf(" B" , 2 ),
25
+ arrayOf(" C" , 3 )
26
+ )
27
+
28
+ @ParameterizedTest
29
+ @MethodSource(" data" )
30
+ fun test (char : String , number : Int , info : TestInfo ) {
31
+ assertEquals(" [$number ] $char , $number " , info.displayName)
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments