collection lambdas added
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* This Java source file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
public class App {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Map<String, Integer> testlist = new HashMap<String, Integer>();
|
||||
testlist.put("one", 1);
|
||||
testlist.put("two", 2);
|
||||
testlist.put("three", 3);
|
||||
testlist.forEach((k, v) -> System.out.println(k + ":" + v));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* This Java source file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class AppTest {
|
||||
@Test public void testAppHasAGreeting() {
|
||||
App classUnderTest = new App();
|
||||
assertNotNull("app should have a greeting", classUnderTest.getGreeting());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user