-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
56 additions
and
58 deletions.
There are no files selected for viewing
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
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
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
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
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,6 @@ | ||
#Thu Feb 24 11:45:42 IST 2022 | ||
summary.Date=Thu Feb 24 11\:45\:42 IST 2022 | ||
summary.Version=unknown | ||
summary.Station=172.17.16.1 | ||
summary.Scenario=default | ||
summary.User=itaiag |
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
43 changes: 43 additions & 0 deletions
43
...miscellaneous/jsystem-services-tests/src/main/java/com/aqua/services/java8/TestJava8.java
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,43 @@ | ||
package com.aqua.services.java8; | ||
|
||
import jsystem.framework.TestProperties; | ||
import junit.framework.SystemTestCase4; | ||
import org.junit.Test; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Locale; | ||
import java.util.Optional; | ||
import java.util.stream.Collectors; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
|
||
public class TestJava8 extends SystemTestCase4 { | ||
|
||
@Test | ||
@TestProperties(name = "Test Java8 lambda expression support") | ||
public void testLambda() { | ||
List<String> names = new ArrayList<>(); | ||
names.add("foo"); | ||
names.add("bar"); | ||
names.add("zoo"); | ||
report.report("Before changes " + names); | ||
List<String> changedNames = names.stream() | ||
.filter(n -> !n.equals("bar")) | ||
.map(n -> n.toUpperCase(Locale.ROOT)) | ||
.collect(Collectors.toList()); | ||
|
||
report.report("After changes " + changedNames); | ||
assertTrue(changedNames.size() == 2); | ||
assertTrue(changedNames.get(0).equals("FOO")); | ||
} | ||
|
||
@Test | ||
@TestProperties(name = "Test Java8 optional feature support") | ||
public void testOptional(){ | ||
String name = "JSystem"; | ||
Optional<String> opt = Optional.of(name); | ||
assertTrue(opt.isPresent()); | ||
} | ||
|
||
} |
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