Skip to content

Commit

Permalink
Issue #4550
Browse files Browse the repository at this point in the history
Simplified test

Signed-off-by: Greg Wilkins <gregw@webtide.com>
  • Loading branch information
gregw committed Feb 24, 2020
1 parent 3728314 commit 626fe71
Showing 1 changed file with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.ArgumentsProvider;
import org.junit.jupiter.params.provider.ArgumentsSource;
import org.junit.jupiter.params.provider.MethodSource;
import org.xml.sax.SAXException;

import static java.nio.charset.StandardCharsets.UTF_8;
Expand Down Expand Up @@ -861,32 +862,25 @@ public void testCallMissingVarArgs() throws Exception
assertNull(atc.getThird());
}

public static class NumberTypeProvider implements ArgumentsProvider
public static List<String> typeTestData()
{
@Override
public Stream<? extends Arguments> provideArguments(ExtensionContext context)
{
return Stream.of(
"byte",
"int",
// "char",
"short",
"long",
"float",
"double",
"Byte",
"Integer",
// "Character",
"Short",
"Long",
"Float",
"Double"
).map(Arguments::of);
}
return Arrays.asList(
"byte",
"int",
"short",
"long",
"float",
"double",
"Byte",
"Integer",
"Short",
"Long",
"Float",
"Double");
}

@ParameterizedTest
@ArgumentsSource(NumberTypeProvider.class)
@MethodSource("typeTestData")
public void testCallNumberConversion(String type) throws Exception
{
XmlConfiguration xmlConfiguration = asXmlConfiguration(
Expand Down

0 comments on commit 626fe71

Please sign in to comment.