11package io .securecodebox .persistence .defectdojo .config ;
22
3+ import org .junit .jupiter .api .Disabled ;
34import org .junit .jupiter .api .Test ;
45import org .junit .jupiter .api .extension .ExtendWith ;
56import org .junit .jupiter .params .ParameterizedTest ;
@@ -23,26 +24,26 @@ class ConfigTest {
2324
2425 @ Test
2526 void constructor_urlMustNotBeNull () {
26- final var thrown = assertThrows (NullPointerException .class , () ->{
27- new Config (null , "apiKey" , "username" , 1 ,null );
27+ final var thrown = assertThrows (NullPointerException .class , () -> {
28+ new Config (null , "apiKey" , "username" , 1 , null );
2829 });
2930
3031 assertThat (thrown .getMessage (), startsWith ("url " ));
3132 }
3233
3334 @ Test
3435 void constructor_apiKeyMustNotBeNull () {
35- final var thrown = assertThrows (NullPointerException .class , () ->{
36- new Config ("url" , null , "username" , 1 ,null );
36+ final var thrown = assertThrows (NullPointerException .class , () -> {
37+ new Config ("url" , null , "username" , 1 , null );
3738 });
3839
3940 assertThat (thrown .getMessage (), startsWith ("apiKey " ));
4041 }
4142
4243 @ Test
4344 void constructor_usernameMustNotBeNull () {
44- final var thrown = assertThrows (NullPointerException .class , () ->{
45- new Config ("url" , "apiKey" , null , 1 ,null );
45+ final var thrown = assertThrows (NullPointerException .class , () -> {
46+ new Config ("url" , "apiKey" , null , 1 , null );
4647 });
4748
4849 assertThat (thrown .getMessage (), startsWith ("username " ));
@@ -51,8 +52,8 @@ void constructor_usernameMustNotBeNull() {
5152 @ ParameterizedTest
5253 @ ValueSource (ints = {0 , -1 , -2 , -23 , -42 , Integer .MIN_VALUE })
5354 void constructor_maxPageCountForGetsMustNotBeLessThanOne (final int number ) {
54- final var thrown = assertThrows (IllegalArgumentException .class , () ->{
55- new Config ("url" , "apiKey" , "username" , number ,null );
55+ final var thrown = assertThrows (IllegalArgumentException .class , () -> {
56+ new Config ("url" , "apiKey" , "username" , number , null );
5657 });
5758
5859 assertThat (thrown .getMessage (), startsWith ("maxPageCountForGets " ));
@@ -76,4 +77,29 @@ void fromEnv() {
7677 () -> assertThat (sut .getMaxPageCountForGets (), is (23 ))
7778 );
7879 }
80+
81+ @ Test
82+ @ Disabled ("Not implemented yet!" )
83+ void fromEnv_throwsExceptionIfNoUrlSet () {
84+ }
85+
86+ @ Test
87+ @ Disabled ("Not implemented yet!" )
88+ void fromEnv_throwsExceptionIfNoUserNameSet () {
89+ }
90+
91+ @ Test
92+ @ Disabled ("Not implemented yet!" )
93+ void fromEnv_throwsExceptionIfNoApiKeySet () {
94+ }
95+
96+ @ Test
97+ @ Disabled ("Not implemented yet!" )
98+ void fromEnv_throwsExceptionIfNoUserIdSet () {
99+ }
100+
101+ @ Test
102+ @ Disabled ("Not implemented yet!" )
103+ void fromEnv_usesDefaultIfNoMaxPageCountForGetSet () {
104+ }
79105}
0 commit comments