Fixed most reported issues by SonarCloud.
This commit is contained in:
		| @@ -25,12 +25,22 @@ package com.iluwatar.dao; | ||||
|  | ||||
| import org.junit.jupiter.api.Test; | ||||
|  | ||||
| import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; | ||||
|  | ||||
| /** | ||||
|  * Tests that DAO example runs without errors. | ||||
|  */ | ||||
| public class AppTest { | ||||
| class AppTest { | ||||
|  | ||||
|   /** | ||||
|    * Issue: Add at least one assertion to this test case. | ||||
|    * | ||||
|    * Solution: Inserted assertion to check whether the execution of the main method in {@link App#main(String[])} | ||||
|    * throws an exception. | ||||
|    */ | ||||
|  | ||||
|   @Test | ||||
|   public void test() throws Exception { | ||||
|     App.main(new String[]{}); | ||||
|   void shouldExecuteDaoWithoutException() { | ||||
|     assertDoesNotThrow(() -> App.main(new String[]{})); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user