ottlinger commented on a change in pull request #19: TAMAYA-218: Simplify 
AssertJ tests
URL: 
https://github.com/apache/incubator-tamaya-sandbox/pull/19#discussion_r250797367
 
 

 ##########
 File path: 
management/src/test/java/org/apache/tamaya/management/internal/ManagedConfigTest.java
 ##########
 @@ -75,19 +72,14 @@ public void testGetConfigurationArea() {
     @Test
     public void testGetAreas() {
         Set<String> sections = (bean.getSections());
-        assertThat(sections).isNotNull();
-        assertThat(sections.contains("java")).isTrue();
-        assertThat(sections.contains("file")).isTrue();
+        assertThat(sections).isNotNull().contains("java", "file");
     }
 
     @Test
     public void testGetTransitiveAreas() {
         Set<String> sections = (bean.getTransitiveSections());
         Set<String> sectionsNT = (bean.getSections());
-        assertThat(sections).isNotNull();
-        assertThat(sections.contains("java")).isTrue();
-        assertThat(sections.contains("sun")).isTrue();
-        assertThat(sections.contains("sun.os")).isTrue();
+        assertThat(sections).isNotNull().contains("java", "sun", "sun.os");
         assertThat(sectionsNT.size() < sections.size()).isTrue();
 
 Review comment:
   Just found out that it'S even simpler:
   assertThat(sections.size()).isGreaterThan(sections.size());
   
   Thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to