@@ -62,7 +62,6 @@ void testGetProjectsReturnsList() throws Exception {
6262 @ Test
6363 void testGetProjectsByNameReturnsList () throws Exception {
6464 List <Project > projects = dataProvider .getProjects (TEST_PROJECT );
65- System .out .println ("Projects found: " + projects .size ());
6665 assertNotNull (projects );
6766 }
6867
@@ -133,4 +132,75 @@ void testTriageUpdateDoesNotThrow() throws Exception {
133132 );
134133 }
135134 }
135+
136+ @ Test
137+ void testContainsResultsTrue () {
138+
139+ Results results = mock (Results .class );
140+
141+ List <com .checkmarx .ast .results .result .Result > list = new ArrayList <>();
142+ list .add (mock (com .checkmarx .ast .results .result .Result .class ));
143+
144+ when (results .getResults ()).thenReturn (list );
145+
146+ dataProvider .setCurrentResults (results );
147+
148+ assertTrue (dataProvider .containsResults ());
149+ }
150+
151+ @ Test
152+ void testGetStatesForEngineSAST () {
153+
154+ List <String > states = dataProvider .getStatesForEngine ("SAST" );
155+
156+ assertNotNull (states );
157+ }
158+
159+ @ Test
160+ void testGetStatesForEngineOther () {
161+
162+ List <String > states = dataProvider .getStatesForEngine ("SCA" );
163+
164+ assertNotNull (states );
165+ }
166+
167+ @ Test
168+ void testGetCustomStates () {
169+
170+ List <String > states = dataProvider .getCustomStates ();
171+
172+ assertNotNull (states );
173+ }
174+
175+ @ Test
176+ void testGetResultsForScanIdInvalid () {
177+
178+ List <?> results = dataProvider .getResultsForScanId ("invalid-uuid" );
179+
180+ assertNotNull (results );
181+ }
182+
183+ @ Test
184+ void testGetBranchesForProjectEmpty () {
185+
186+ List <String > branches = dataProvider .getBranchesForProject ("" );
187+
188+ assertNotNull (branches );
189+ }
190+
191+ @ Test
192+ void testGetScansForProjectNullBranch () {
193+
194+ List <Scan > scans = dataProvider .getScansForProject (null );
195+
196+ assertNotNull (scans );
197+ }
198+
199+ @ Test
200+ void testGetScanInformationException () {
201+
202+ assertThrows (Exception .class , () -> {
203+ dataProvider .getScanInformation ("invalid-scan" );
204+ });
205+ }
136206}
0 commit comments