File tree Expand file tree Collapse file tree
junit5/src/test/java/com/baeldung Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .baeldung ;
22
3- import static org .junit .jupiter .api .Assertions .assertTrue ;
43import static org .junit .jupiter .api .Assertions .assertEquals ;
4+ import static org .junit .jupiter .api .Assertions .assertTrue ;
55
66import java .util .ArrayList ;
77import java .util .Arrays ;
1717import org .junit .jupiter .api .DynamicTest ;
1818import org .junit .jupiter .api .TestFactory ;
1919import org .junit .jupiter .api .function .ThrowingConsumer ;
20+ import org .junit .platform .runner .JUnitPlatform ;
21+ import org .junit .runner .RunWith ;
2022
2123public class DynamicTestsExample {
2224
@@ -100,9 +102,9 @@ Stream<DynamicTest> dynamicTestsFromStreamInJava8() {
100102 DomainNameResolver resolver = new DomainNameResolver ();
101103
102104 List <String > inputList =
103- new ArrayList <>( Arrays .asList ("www.somedomain.com" , "www.anotherdomain.com" , "www.yetanotherdomain.com" ) );
105+ Arrays .asList ("www.somedomain.com" , "www.anotherdomain.com" , "www.yetanotherdomain.com" );
104106 List <String > outputList =
105- new ArrayList <>( Arrays .asList ("154.174.10.56" , "211.152.104.132" , "178.144.120.156" ) );
107+ Arrays .asList ("154.174.10.56" , "211.152.104.132" , "178.144.120.156" );
106108
107109 return inputList .stream ().map (dom -> DynamicTest .dynamicTest ("Resolving: " + dom , () -> {
108110 int id = inputList .indexOf (dom );
You can’t perform that action at this time.
0 commit comments