collect = persons.stream().map(Person::getName).collect(Collectors.toList());
+
+ collect.forEach(System.out::println);
+
+ return collect;
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/SomeJava8ExamplesApplicationTest.java b/src/test/java/br/com/somejava8examples/SomeJava8ExamplesApplicationTest.java
index a3e4db3..03f2e1a 100644
--- a/src/test/java/br/com/somejava8examples/SomeJava8ExamplesApplicationTest.java
+++ b/src/test/java/br/com/somejava8examples/SomeJava8ExamplesApplicationTest.java
@@ -12,25 +12,25 @@
@ActiveProfiles("test")
class SomeJava8ExamplesApplicationTest {
- @BeforeAll
- static void setUpBeforeClass() throws Exception {
- }
-
- @AfterAll
- static void tearDownAfterClass() throws Exception {
- }
-
- @BeforeEach
- void setUp() throws Exception {
- }
-
- @AfterEach
- void tearDown() throws Exception {
- }
-
- @Test
- void testMain() {
- SomeJava8ExamplesApplication.main(new String[] {});
- }
+ @BeforeAll
+ static void setUpBeforeClass() throws Exception {
+ }
+
+ @AfterAll
+ static void tearDownAfterClass() throws Exception {
+ }
+
+ @BeforeEach
+ void setUp() throws Exception {
+ }
+
+ @AfterEach
+ void tearDown() throws Exception {
+ }
+
+ @Test
+ void testMain() {
+ SomeJava8ExamplesApplication.main(new String[] {});
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/commons/entities/HostingTest.java b/src/test/java/br/com/somejava8examples/commons/entities/HostingTest.java
index 4116d0c..05477ef 100644
--- a/src/test/java/br/com/somejava8examples/commons/entities/HostingTest.java
+++ b/src/test/java/br/com/somejava8examples/commons/entities/HostingTest.java
@@ -12,74 +12,74 @@
@ActiveProfiles("test")
class HostingTest {
- private Hosting hosting;
-
- @BeforeEach
- void setUp() throws Exception {
- hosting = new Hosting(12, "NAME", 23323L);
- }
+ private Hosting hosting;
+
+ @BeforeEach
+ void setUp() throws Exception {
+ hosting = new Hosting(12, "NAME", 23323L);
+ }
- @Test
- void testHashCode() {
- assertNotNull(hosting.hashCode());
- }
+ @Test
+ void testHashCode() {
+ assertNotNull(hosting.hashCode());
+ }
- @Test
- void testHosting() {
- assertNotNull(new Hosting(44, "LASKÇDLSAK", 888L));
- }
+ @Test
+ void testHosting() {
+ assertNotNull(new Hosting(44, "LASKÇDLSAK", 888L));
+ }
- @Test
- void testGetId() {
- assertNotNull(hosting.getId());
- }
+ @Test
+ void testGetId() {
+ assertNotNull(hosting.getId());
+ }
- @Test
- void testSetId() {
- hosting.setId(7938);
- assertNotNull(hosting.getId());
- }
+ @Test
+ void testSetId() {
+ hosting.setId(7938);
+ assertNotNull(hosting.getId());
+ }
- @Test
- void testGetName() {
- assertNotNull(hosting.getName());
- }
+ @Test
+ void testGetName() {
+ assertNotNull(hosting.getName());
+ }
- @Test
- void testSetName() {
- hosting.setName("KKKJSJJS");
- assertNotNull(hosting.getName());
- }
+ @Test
+ void testSetName() {
+ hosting.setName("KKKJSJJS");
+ assertNotNull(hosting.getName());
+ }
- @Test
- void testGetWebsites() {
- assertNotNull(hosting.getWebsites());
- }
+ @Test
+ void testGetWebsites() {
+ assertNotNull(hosting.getWebsites());
+ }
- @Test
- void testSetWebsites() {
- hosting.setWebsites(9999L);
- assertNotNull(hosting.getWebsites());
- }
+ @Test
+ void testSetWebsites() {
+ hosting.setWebsites(9999L);
+ assertNotNull(hosting.getWebsites());
+ }
- @Test
- void testEqualsObject() {
- assertTrue(!hosting.equals(null));
- }
-
- @Test
- void testEqualsNewObject() {
- assertTrue(!hosting.equals(new Object()));
- }
-
- @Test
- void testEqualsNew() {
- assertTrue(!hosting.equals(new Hosting(33, "OOOI", 22299L)));
- }
+ @Test
+ void testEqualsObject() {
+ assertTrue(!hosting.equals(null));
+ }
+
+ @Test
+ void testEqualsNewObject() {
+ assertTrue(!hosting.equals(new Object()));
+ }
+
+ @Test
+ void testEqualsNew() {
+ assertTrue(!hosting.equals(new Hosting(33, "OOOI", 22299L)));
+ }
- @Test
- void testToString() {
- assertNotNull(hosting.toString());
- }
+ @Test
+ void testToString() {
+ assertNotNull(hosting.toString());
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/commons/entities/Mobile2Test.java b/src/test/java/br/com/somejava8examples/commons/entities/Mobile2Test.java
index 4eb2520..970c768 100644
--- a/src/test/java/br/com/somejava8examples/commons/entities/Mobile2Test.java
+++ b/src/test/java/br/com/somejava8examples/commons/entities/Mobile2Test.java
@@ -14,88 +14,88 @@
@ActiveProfiles("test")
class Mobile2Test {
- private Mobile2 mobile2;
-
- @BeforeEach
- void setUp() throws Exception {
- mobile2 = new Mobile2();
- mobile2.setBrand("ASLJDK");
- mobile2.setId(133L);
- mobile2.setName("ASLKDJLASJD");
- mobile2.setDisplayFeatures2(Optional.empty());
- }
-
- @Test
- void testHashCode() {
- assertNotNull(mobile2.hashCode());
- }
-
- @Test
- void testGetId() {
- assertNotNull(mobile2.getId());
- }
-
- @Test
- void testSetId() {
- mobile2.setId(3332L);
- assertNotNull(mobile2.getId());
- }
-
- @Test
- void testGetBrand() {
- assertNotNull(mobile2.getBrand());
- }
-
- @Test
- void testSetBrand() {
- mobile2.setBrand("HHH#%@LKJ");
- assertNotNull(mobile2.getBrand());
- }
-
- @Test
- void testGetName() {
- assertNotNull(mobile2.getName());
- }
-
- @Test
- void testSetName() {
- mobile2.setName("ALSKHDASKLJD");
- assertNotNull(mobile2.getName());
- }
-
- @Test
- void testGetDisplayFeatures2() {
- assertNotNull(mobile2.getDisplayFeatures2());
- }
-
- @Test
- void testSetDisplayFeatures2() {
- mobile2.setDisplayFeatures2(Optional.of(new DisplayFeatures2()));
- assertNotNull(mobile2.getDisplayFeatures2());
- }
-
- @Test
- void testEqualsObject() {
- assertTrue(!mobile2.equals(null));
- }
-
- @Test
- void testEqualsNewObject() {
- assertTrue(!mobile2.equals(new Object()));
- }
-
- @Test
- void testEqualsMobile2() {
- Mobile2 mobileNew = new Mobile2();
- mobileNew.setBrand("ASLJDDDDDK");
- mobileNew.setId(13344L);
- mobileNew.setName("AXXXXDJLASJD");
- assertTrue(!mobile2.equals(mobileNew));
- }
-
- @Test
- void testToString() {
- assertNotNull(mobile2.toString());
- }
+ private Mobile2 mobile2;
+
+ @BeforeEach
+ void setUp() throws Exception {
+ mobile2 = new Mobile2();
+ mobile2.setBrand("ASLJDK");
+ mobile2.setId(133L);
+ mobile2.setName("ASLKDJLASJD");
+ mobile2.setDisplayFeatures2(Optional.empty());
+ }
+
+ @Test
+ void testHashCode() {
+ assertNotNull(mobile2.hashCode());
+ }
+
+ @Test
+ void testGetId() {
+ assertNotNull(mobile2.getId());
+ }
+
+ @Test
+ void testSetId() {
+ mobile2.setId(3332L);
+ assertNotNull(mobile2.getId());
+ }
+
+ @Test
+ void testGetBrand() {
+ assertNotNull(mobile2.getBrand());
+ }
+
+ @Test
+ void testSetBrand() {
+ mobile2.setBrand("HHH#%@LKJ");
+ assertNotNull(mobile2.getBrand());
+ }
+
+ @Test
+ void testGetName() {
+ assertNotNull(mobile2.getName());
+ }
+
+ @Test
+ void testSetName() {
+ mobile2.setName("ALSKHDASKLJD");
+ assertNotNull(mobile2.getName());
+ }
+
+ @Test
+ void testGetDisplayFeatures2() {
+ assertNotNull(mobile2.getDisplayFeatures2());
+ }
+
+ @Test
+ void testSetDisplayFeatures2() {
+ mobile2.setDisplayFeatures2(Optional.of(new DisplayFeatures2()));
+ assertNotNull(mobile2.getDisplayFeatures2());
+ }
+
+ @Test
+ void testEqualsObject() {
+ assertTrue(!mobile2.equals(null));
+ }
+
+ @Test
+ void testEqualsNewObject() {
+ assertTrue(!mobile2.equals(new Object()));
+ }
+
+ @Test
+ void testEqualsMobile2() {
+ Mobile2 mobileNew = new Mobile2();
+ mobileNew.setBrand("ASLJDDDDDK");
+ mobileNew.setId(13344L);
+ mobileNew.setName("AXXXXDJLASJD");
+ assertTrue(!mobile2.equals(mobileNew));
+ }
+
+ @Test
+ void testToString() {
+ assertNotNull(mobile2.toString());
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/commons/entities/MobileTest.java b/src/test/java/br/com/somejava8examples/commons/entities/MobileTest.java
index ef77a2e..1696148 100644
--- a/src/test/java/br/com/somejava8examples/commons/entities/MobileTest.java
+++ b/src/test/java/br/com/somejava8examples/commons/entities/MobileTest.java
@@ -12,88 +12,88 @@
@ActiveProfiles("test")
class MobileTest {
- private Mobile mobile2;
-
- @BeforeEach
- void setUp() throws Exception {
- mobile2 = new Mobile();
- mobile2.setBrand("ASLJDK");
- mobile2.setId(133L);
- mobile2.setName("ASLKDJLASJD");
- mobile2.setDisplayFeatures(new DisplayFeatures());
- }
-
- @Test
- void testHashCode() {
- assertNotNull(mobile2.hashCode());
- }
-
- @Test
- void testGetId() {
- assertNotNull(mobile2.getId());
- }
-
- @Test
- void testSetId() {
- mobile2.setId(3332L);
- assertNotNull(mobile2.getId());
- }
-
- @Test
- void testGetBrand() {
- assertNotNull(mobile2.getBrand());
- }
-
- @Test
- void testSetBrand() {
- mobile2.setBrand("HHH#%@LKJ");
- assertNotNull(mobile2.getBrand());
- }
-
- @Test
- void testGetName() {
- assertNotNull(mobile2.getName());
- }
-
- @Test
- void testSetName() {
- mobile2.setName("ALSKHDASKLJD");
- assertNotNull(mobile2.getName());
- }
-
- @Test
- void testGetDisplayFeatures2() {
- assertNotNull(mobile2.getDisplayFeatures());
- }
-
- @Test
- void testSetDisplayFeatures2() {
- mobile2.setDisplayFeatures(new DisplayFeatures());
- assertNotNull(mobile2.getDisplayFeatures());
- }
-
- @Test
- void testEqualsObject() {
- assertTrue(!mobile2.equals(null));
- }
-
- @Test
- void testEqualsNewObject() {
- assertTrue(!mobile2.equals(new Object()));
- }
-
- @Test
- void testEqualsMobile() {
- Mobile mobileNew = new Mobile();
- mobileNew.setBrand("ASLJDDDDDK");
- mobileNew.setId(13344L);
- mobileNew.setName("AXXXXDJLASJD");
- assertTrue(!mobile2.equals(mobileNew));
- }
-
- @Test
- void testToString() {
- assertNotNull(mobile2.toString());
- }
+ private Mobile mobile2;
+
+ @BeforeEach
+ void setUp() throws Exception {
+ mobile2 = new Mobile();
+ mobile2.setBrand("ASLJDK");
+ mobile2.setId(133L);
+ mobile2.setName("ASLKDJLASJD");
+ mobile2.setDisplayFeatures(new DisplayFeatures());
+ }
+
+ @Test
+ void testHashCode() {
+ assertNotNull(mobile2.hashCode());
+ }
+
+ @Test
+ void testGetId() {
+ assertNotNull(mobile2.getId());
+ }
+
+ @Test
+ void testSetId() {
+ mobile2.setId(3332L);
+ assertNotNull(mobile2.getId());
+ }
+
+ @Test
+ void testGetBrand() {
+ assertNotNull(mobile2.getBrand());
+ }
+
+ @Test
+ void testSetBrand() {
+ mobile2.setBrand("HHH#%@LKJ");
+ assertNotNull(mobile2.getBrand());
+ }
+
+ @Test
+ void testGetName() {
+ assertNotNull(mobile2.getName());
+ }
+
+ @Test
+ void testSetName() {
+ mobile2.setName("ALSKHDASKLJD");
+ assertNotNull(mobile2.getName());
+ }
+
+ @Test
+ void testGetDisplayFeatures2() {
+ assertNotNull(mobile2.getDisplayFeatures());
+ }
+
+ @Test
+ void testSetDisplayFeatures2() {
+ mobile2.setDisplayFeatures(new DisplayFeatures());
+ assertNotNull(mobile2.getDisplayFeatures());
+ }
+
+ @Test
+ void testEqualsObject() {
+ assertTrue(!mobile2.equals(null));
+ }
+
+ @Test
+ void testEqualsNewObject() {
+ assertTrue(!mobile2.equals(new Object()));
+ }
+
+ @Test
+ void testEqualsMobile() {
+ Mobile mobileNew = new Mobile();
+ mobileNew.setBrand("ASLJDDDDDK");
+ mobileNew.setId(13344L);
+ mobileNew.setName("AXXXXDJLASJD");
+ assertTrue(!mobile2.equals(mobileNew));
+ }
+
+ @Test
+ void testToString() {
+ assertNotNull(mobile2.toString());
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/commons/entities/StaffPublicTest.java b/src/test/java/br/com/somejava8examples/commons/entities/StaffPublicTest.java
index 22e91bd..a107973 100644
--- a/src/test/java/br/com/somejava8examples/commons/entities/StaffPublicTest.java
+++ b/src/test/java/br/com/somejava8examples/commons/entities/StaffPublicTest.java
@@ -7,77 +7,77 @@
class StaffPublicTest {
- private StaffPublic staffPublic;
-
- @BeforeEach
- void setUp() throws Exception {
- staffPublic = new StaffPublic();
- staffPublic.setAge(12);
- staffPublic.setExtra("EXTRA");
- staffPublic.setName("ASHDKASJD");
- }
+ private StaffPublic staffPublic;
+
+ @BeforeEach
+ void setUp() throws Exception {
+ staffPublic = new StaffPublic();
+ staffPublic.setAge(12);
+ staffPublic.setExtra("EXTRA");
+ staffPublic.setName("ASHDKASJD");
+ }
- @Test
- void testHashCode() {
- assertNotNull(staffPublic.hashCode());
- }
+ @Test
+ void testHashCode() {
+ assertNotNull(staffPublic.hashCode());
+ }
- @Test
- void testStaffPublic() {
- assertNotNull(new StaffPublic("NAME", 30, "EXTRA"));
- }
+ @Test
+ void testStaffPublic() {
+ assertNotNull(new StaffPublic("NAME", 30, "EXTRA"));
+ }
- @Test
- void testGetName() {
- assertNotNull(staffPublic.getName());
- }
+ @Test
+ void testGetName() {
+ assertNotNull(staffPublic.getName());
+ }
- @Test
- void testSetName() {
- staffPublic.setName("NAME2");
- assertNotNull(staffPublic.getName());
- }
+ @Test
+ void testSetName() {
+ staffPublic.setName("NAME2");
+ assertNotNull(staffPublic.getName());
+ }
- @Test
- void testGetAge() {
- assertNotNull(staffPublic.getAge());
- }
+ @Test
+ void testGetAge() {
+ assertNotNull(staffPublic.getAge());
+ }
- @Test
- void testSetAge() {
- staffPublic.setAge(50);
- assertNotNull(staffPublic.getAge());
- }
+ @Test
+ void testSetAge() {
+ staffPublic.setAge(50);
+ assertNotNull(staffPublic.getAge());
+ }
- @Test
- void testGetExtra() {
- assertNotNull(staffPublic.getExtra());
- }
+ @Test
+ void testGetExtra() {
+ assertNotNull(staffPublic.getExtra());
+ }
- @Test
- void testSetExtra() {
- staffPublic.setExtra("ASJKDHKASJ");
- assertNotNull(staffPublic.getExtra());
- }
+ @Test
+ void testSetExtra() {
+ staffPublic.setExtra("ASJKDHKASJ");
+ assertNotNull(staffPublic.getExtra());
+ }
- @Test
- void testEqualsObject() {
- assertNotNull(staffPublic.equals(null));
- }
-
- @Test
- void testEqualsNewObject() {
- assertNotNull(staffPublic.equals(new Object()));
- }
-
- @Test
- void testEqualsNew() {
- assertNotNull(staffPublic.equals(new StaffPublic()));
- }
+ @Test
+ void testEqualsObject() {
+ assertNotNull(staffPublic.equals(null));
+ }
+
+ @Test
+ void testEqualsNewObject() {
+ assertNotNull(staffPublic.equals(new Object()));
+ }
+
+ @Test
+ void testEqualsNew() {
+ assertNotNull(staffPublic.equals(new StaffPublic()));
+ }
- @Test
- void testToString() {
- assertNotNull(staffPublic.toString());
- }
+ @Test
+ void testToString() {
+ assertNotNull(staffPublic.toString());
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/commons/entities/StaffTest.java b/src/test/java/br/com/somejava8examples/commons/entities/StaffTest.java
index 8eb50b0..a25b1c3 100644
--- a/src/test/java/br/com/somejava8examples/commons/entities/StaffTest.java
+++ b/src/test/java/br/com/somejava8examples/commons/entities/StaffTest.java
@@ -15,74 +15,74 @@
@ActiveProfiles("test")
class StaffTest {
- private Staff staff;
-
- @BeforeEach
- void setUp() throws Exception {
- staff = new Staff("KASHDKJS", 34, new BigDecimal(12333));
- }
-
- @Test
- void testHashCode() {
- assertNotNull(staff.hashCode());
- }
-
- @Test
- void testStaff() {
- assertNotNull(new Staff("WWWWWS", 54, new BigDecimal(3344)));
- }
-
- @Test
- void testGetName() {
- assertNotNull(staff.getName());
- }
-
- @Test
- void testSetName() {
- staff.setName("JJJS");
- assertNotNull(staff.getName());
- }
-
- @Test
- void testGetAge() {
- assertNotNull(staff.getAge());
- }
-
- @Test
- void testSetAge() {
- staff.setAge(36);
- assertNotNull(staff.getAge());
- }
-
- @Test
- void testGetSalary() {
- assertNotNull(staff.getSalary());
- }
-
- @Test
- void testSetSalary() {
- staff.setSalary(new BigDecimal(999));
- assertNotNull(staff.getSalary());
- }
-
- @Test
- void testEqualsObject() {
- assertTrue(!staff.equals(null));
- }
-
- @Test
- void testEqualsNew() {
- assertTrue(!staff.equals(new Staff("ASKLJD", 78, new BigDecimal(333))));
- }
-
- @Test
- void testEqualsNewObject() {
- assertTrue(!staff.equals(new Object()));
- }
-
- @Test
- void testToString() {
- assertNotNull(staff.toString());
- }
+ private Staff staff;
+
+ @BeforeEach
+ void setUp() throws Exception {
+ staff = new Staff("KASHDKJS", 34, new BigDecimal(12333));
+ }
+
+ @Test
+ void testHashCode() {
+ assertNotNull(staff.hashCode());
+ }
+
+ @Test
+ void testStaff() {
+ assertNotNull(new Staff("WWWWWS", 54, new BigDecimal(3344)));
+ }
+
+ @Test
+ void testGetName() {
+ assertNotNull(staff.getName());
+ }
+
+ @Test
+ void testSetName() {
+ staff.setName("JJJS");
+ assertNotNull(staff.getName());
+ }
+
+ @Test
+ void testGetAge() {
+ assertNotNull(staff.getAge());
+ }
+
+ @Test
+ void testSetAge() {
+ staff.setAge(36);
+ assertNotNull(staff.getAge());
+ }
+
+ @Test
+ void testGetSalary() {
+ assertNotNull(staff.getSalary());
+ }
+
+ @Test
+ void testSetSalary() {
+ staff.setSalary(new BigDecimal(999));
+ assertNotNull(staff.getSalary());
+ }
+
+ @Test
+ void testEqualsObject() {
+ assertTrue(!staff.equals(null));
+ }
+
+ @Test
+ void testEqualsNew() {
+ assertTrue(!staff.equals(new Staff("ASKLJD", 78, new BigDecimal(333))));
+ }
+
+ @Test
+ void testEqualsNewObject() {
+ assertTrue(!staff.equals(new Object()));
+ }
+
+ @Test
+ void testToString() {
+ assertNotNull(staff.toString());
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/commons/service/MobileServiceTest.java b/src/test/java/br/com/somejava8examples/commons/service/MobileServiceTest.java
index 5bfe3dd..79b19a6 100644
--- a/src/test/java/br/com/somejava8examples/commons/service/MobileServiceTest.java
+++ b/src/test/java/br/com/somejava8examples/commons/service/MobileServiceTest.java
@@ -16,42 +16,42 @@
@ActiveProfiles("test")
public class MobileServiceTest {
- @Autowired
- private MobileService service;
-
- private Mobile mobile;
-
- @BeforeEach
- void setUp() throws Exception {
- this.mobile = new Mobile();
- mobile.setId(12323L);
- mobile.setBrand("ASDASD");
- mobile.setName("AKJDHASKD");
- }
-
- @Test
- void getMobileScreenWidthDisplayFeaturesNullTest() {
- assertEquals(0, service.getMobileScreenWidth(this.mobile));
- }
-
- @Test
- void getMobileScreenWidthDisplayFeaturesScreenResolutionNullTest() {
- DisplayFeatures displayFeatures = new DisplayFeatures();
- displayFeatures.setSize("123px");
- this.mobile.setDisplayFeatures(displayFeatures);
- assertEquals(0, service.getMobileScreenWidth(this.mobile));
- }
-
- @Test
- void getMobileScreenWidthDisplayFeaturesScreenResolutionTest() {
- DisplayFeatures displayFeatures = new DisplayFeatures();
- displayFeatures.setSize("123px");
- ScreenResolution resolution = new ScreenResolution();
- resolution.setHeight(123);
- resolution.setWidth(344);
- displayFeatures.setResolution(resolution);
- this.mobile.setDisplayFeatures(displayFeatures);
- assertEquals(344, service.getMobileScreenWidth(this.mobile));
- }
+ @Autowired
+ private MobileService service;
+
+ private Mobile mobile;
+
+ @BeforeEach
+ void setUp() throws Exception {
+ this.mobile = new Mobile();
+ mobile.setId(12323L);
+ mobile.setBrand("ASDASD");
+ mobile.setName("AKJDHASKD");
+ }
+
+ @Test
+ void getMobileScreenWidthDisplayFeaturesNullTest() {
+ assertEquals(0, service.getMobileScreenWidth(this.mobile));
+ }
+
+ @Test
+ void getMobileScreenWidthDisplayFeaturesScreenResolutionNullTest() {
+ DisplayFeatures displayFeatures = new DisplayFeatures();
+ displayFeatures.setSize("123px");
+ this.mobile.setDisplayFeatures(displayFeatures);
+ assertEquals(0, service.getMobileScreenWidth(this.mobile));
+ }
+
+ @Test
+ void getMobileScreenWidthDisplayFeaturesScreenResolutionTest() {
+ DisplayFeatures displayFeatures = new DisplayFeatures();
+ displayFeatures.setSize("123px");
+ ScreenResolution resolution = new ScreenResolution();
+ resolution.setHeight(123);
+ resolution.setWidth(344);
+ displayFeatures.setResolution(resolution);
+ this.mobile.setDisplayFeatures(displayFeatures);
+ assertEquals(344, service.getMobileScreenWidth(this.mobile));
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/comparator/ComparatorTests.java b/src/test/java/br/com/somejava8examples/comparator/ComparatorTests.java
index 7e33ea0..1d957d8 100644
--- a/src/test/java/br/com/somejava8examples/comparator/ComparatorTests.java
+++ b/src/test/java/br/com/somejava8examples/comparator/ComparatorTests.java
@@ -11,45 +11,45 @@
@ActiveProfiles("test")
public class ComparatorTests {
- @Autowired
- private SortWithoutLambdaService service;
-
- @Autowired
- private SortWithLambdaService serviceWithLambda;
-
- @Test
- public void sortAgeWithoutLambda() {
- assertFalse(service.sortByAge(service.getDevelopers()).isEmpty(), "List is empty");
- }
-
- @Test
- public void sortNameWithoutLambda() {
- assertFalse(service.sortByName(service.getDevelopers()).isEmpty(), "List is empty");
- }
-
- @Test
- public void sortSalaryWithoutLambda() {
- assertFalse(service.sortBySalary(service.getDevelopers()).isEmpty(), "List is empty");
- }
-
- @Test
- public void sortAgeWithLambda() {
- assertFalse(serviceWithLambda.sortByAge(serviceWithLambda.getDevelopers()).isEmpty(), "List is empty");
- }
-
- @Test
- public void sortNameWithLambda() {
- assertFalse(serviceWithLambda.sortByName(serviceWithLambda.getDevelopers()).isEmpty(), "List is empty");
- }
-
- @Test
- public void sortSalaryWithLambda() {
- assertFalse(serviceWithLambda.sortBySalary(serviceWithLambda.getDevelopers()).isEmpty(), "List is empty");
- }
-
- @Test
- public void sortAgeReversedWithLambda() {
- assertFalse(serviceWithLambda.sortByAgeReversed(serviceWithLambda.getDevelopers()).isEmpty(), "List is empty");
- }
+ @Autowired
+ private SortWithoutLambdaService service;
+
+ @Autowired
+ private SortWithLambdaService serviceWithLambda;
+
+ @Test
+ public void sortAgeWithoutLambda() {
+ assertFalse(service.sortByAge(service.getDevelopers()).isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void sortNameWithoutLambda() {
+ assertFalse(service.sortByName(service.getDevelopers()).isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void sortSalaryWithoutLambda() {
+ assertFalse(service.sortBySalary(service.getDevelopers()).isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void sortAgeWithLambda() {
+ assertFalse(serviceWithLambda.sortByAge(serviceWithLambda.getDevelopers()).isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void sortNameWithLambda() {
+ assertFalse(serviceWithLambda.sortByName(serviceWithLambda.getDevelopers()).isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void sortSalaryWithLambda() {
+ assertFalse(serviceWithLambda.sortBySalary(serviceWithLambda.getDevelopers()).isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void sortAgeReversedWithLambda() {
+ assertFalse(serviceWithLambda.sortByAgeReversed(serviceWithLambda.getDevelopers()).isEmpty(), "List is empty");
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/foreach/ForEachTests.java b/src/test/java/br/com/somejava8examples/foreach/ForEachTests.java
index 8550474..344c13c 100644
--- a/src/test/java/br/com/somejava8examples/foreach/ForEachTests.java
+++ b/src/test/java/br/com/somejava8examples/foreach/ForEachTests.java
@@ -11,22 +11,22 @@
@ActiveProfiles("test")
public class ForEachTests {
- @Autowired
- private ForEachService service;
-
- @Test
- public void normalWayToLoopMapTest() {
- assertFalse(service.normalWayToLoopMap().isEmpty(), "List is empty");
- }
-
- @Test
- public void normalWayToLoopMapLambdaExpressionTest() {
- assertFalse(service.normalWayToLoopMapLambdaExpression().isEmpty(), "List is empty");
- }
-
- @Test
- public void forEachAndListTest() {
- assertFalse(service.forEachAndList().isEmpty(), "List is empty");
- }
+ @Autowired
+ private ForEachService service;
+
+ @Test
+ public void normalWayToLoopMapTest() {
+ assertFalse(service.normalWayToLoopMap().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void normalWayToLoopMapLambdaExpressionTest() {
+ assertFalse(service.normalWayToLoopMapLambdaExpression().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void forEachAndListTest() {
+ assertFalse(service.forEachAndList().isEmpty(), "List is empty");
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/stream/StreamCollectorsGroupingTest.java b/src/test/java/br/com/somejava8examples/stream/StreamCollectorsGroupingTest.java
index d278f51..180b6e4 100644
--- a/src/test/java/br/com/somejava8examples/stream/StreamCollectorsGroupingTest.java
+++ b/src/test/java/br/com/somejava8examples/stream/StreamCollectorsGroupingTest.java
@@ -12,27 +12,27 @@
@ActiveProfiles("test")
public class StreamCollectorsGroupingTest {
- @Autowired
- private StreamCollectorsGroupingService service;
-
- @Test
- public void groupByCountAndSortTest() {
- assertFalse(service.groupByCountAndSort().isEmpty(), "List is empty");
- }
-
- @Test
- public void sortingTest() {
- assertFalse(service.sorting().isEmpty(), "List is empty");
- }
-
- @Test
- public void groupByTheNameCountOrSumtheQty() {
- assertFalse(service.groupByTheNameCountOrSumtheQty().isEmpty(), "List is empty");
- }
-
- @Test
- public void groupByPriceCollectorsGroupingByAndCollectorsMappingExample() {
- assertFalse(service.groupByPriceCollectorsGroupingByAndCollectorsMappingExample().isEmpty(), "List is empty");
- }
+ @Autowired
+ private StreamCollectorsGroupingService service;
+
+ @Test
+ public void groupByCountAndSortTest() {
+ assertFalse(service.groupByCountAndSort().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void sortingTest() {
+ assertFalse(service.sorting().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void groupByTheNameCountOrSumtheQty() {
+ assertFalse(service.groupByTheNameCountOrSumtheQty().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void groupByPriceCollectorsGroupingByAndCollectorsMappingExample() {
+ assertFalse(service.groupByPriceCollectorsGroupingByAndCollectorsMappingExample().isEmpty(), "List is empty");
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/stream/StreamsFilterMapsTest.java b/src/test/java/br/com/somejava8examples/stream/StreamsFilterMapsTest.java
index 30c13a9..98f064d 100644
--- a/src/test/java/br/com/somejava8examples/stream/StreamsFilterMapsTest.java
+++ b/src/test/java/br/com/somejava8examples/stream/StreamsFilterMapsTest.java
@@ -12,27 +12,27 @@
@ActiveProfiles("test")
public class StreamsFilterMapsTest {
- @Autowired
- private StreamsFilterMapService service;
-
- @Test
- public void listOfStringsToUppercaseTest() {
- assertFalse(service.listOfStringsToUppercase().isEmpty(), "List is empty");
- }
-
- @Test
- public void listOfObjectsListOfStringTest() {
- assertFalse(service.listOfObjectsListOfString().isEmpty(), "List is empty");
- }
-
- @Test
- public void listOfObjectsListOfOtherObjectsTest() {
- assertFalse(service.listOfObjectsListOfOtherObjects().isEmpty(), "List is empty");
- }
-
- @Test
- public void convertInsideTheMapMethodDirectlyTest() {
- assertFalse(service.convertInsideTheMapMethodDirectly().isEmpty(), "List is empty");
- }
+ @Autowired
+ private StreamsFilterMapService service;
+
+ @Test
+ public void listOfStringsToUppercaseTest() {
+ assertFalse(service.listOfStringsToUppercase().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void listOfObjectsListOfStringTest() {
+ assertFalse(service.listOfObjectsListOfString().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void listOfObjectsListOfOtherObjectsTest() {
+ assertFalse(service.listOfObjectsListOfOtherObjects().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void convertInsideTheMapMethodDirectlyTest() {
+ assertFalse(service.convertInsideTheMapMethodDirectly().isEmpty(), "List is empty");
+ }
}
diff --git a/src/test/java/br/com/somejava8examples/stream/StreamsFilterTest.java b/src/test/java/br/com/somejava8examples/stream/StreamsFilterTest.java
index 1f06139..92f7cb4 100644
--- a/src/test/java/br/com/somejava8examples/stream/StreamsFilterTest.java
+++ b/src/test/java/br/com/somejava8examples/stream/StreamsFilterTest.java
@@ -13,36 +13,36 @@
@ActiveProfiles("test")
public class StreamsFilterTest {
- @Autowired
- private StreamsFilterService service;
-
- @Test
- public void streamsFilterAndCollectBeforeJava8Test() {
- Assertions.assertFalse(service.streamsFilterAndCollectBeforeJava8().isEmpty(), "List is empty");
- }
-
- @Test
- public void streamsFilterAndCollectNowJava8Test() {
- Assertions.assertFalse(service.streamsFilterAndCollectNowJava8().isEmpty(), "List is empty");
- }
-
- @Test
- public void getPersonByNameLikeThisBeforeJava8Test() {
- isTrue(service.getPersonByNameLikeThisBeforeJava8() != null, "Entity is empty");
- }
-
- @Test
- public void getPersonByNameLikeThisAfterJava8Test() {
- isTrue(service.getPersonByNameLikeThisAfterJava8() == null, "Entity not is empty");
- }
-
- @Test
- public void getPersonByNameLikeThisJava8ForMultipleConditionTest() {
- isTrue(service.getPersonByNameLikeThisJava8ForMultipleCondition() != null, "Entity is empty");
- }
-
- @Test
- public void getStreamsFilterAndMapTest() {
- Assertions.assertFalse(service.getStreamsFilterAndMap().isEmpty(), "List is empty");
- }
+ @Autowired
+ private StreamsFilterService service;
+
+ @Test
+ public void streamsFilterAndCollectBeforeJava8Test() {
+ Assertions.assertFalse(service.streamsFilterAndCollectBeforeJava8().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void streamsFilterAndCollectNowJava8Test() {
+ Assertions.assertFalse(service.streamsFilterAndCollectNowJava8().isEmpty(), "List is empty");
+ }
+
+ @Test
+ public void getPersonByNameLikeThisBeforeJava8Test() {
+ isTrue(service.getPersonByNameLikeThisBeforeJava8() != null, "Entity is empty");
+ }
+
+ @Test
+ public void getPersonByNameLikeThisAfterJava8Test() {
+ isTrue(service.getPersonByNameLikeThisAfterJava8() == null, "Entity not is empty");
+ }
+
+ @Test
+ public void getPersonByNameLikeThisJava8ForMultipleConditionTest() {
+ isTrue(service.getPersonByNameLikeThisJava8ForMultipleCondition() != null, "Entity is empty");
+ }
+
+ @Test
+ public void getStreamsFilterAndMapTest() {
+ Assertions.assertFalse(service.getStreamsFilterAndMap().isEmpty(), "List is empty");
+ }
}
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy