Fixed most reported issues by SonarCloud.
This commit is contained in:
@ -39,6 +39,12 @@
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -25,12 +25,19 @@ package com.iluwatar.combinator;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
|
||||
public class CombinatorAppTest {
|
||||
|
||||
/**
|
||||
* Issue: Add at least one assertion to this test case.
|
||||
*
|
||||
* Solution: Inserted assertion to check whether the execution of the main method in {@link CombinatorApp#main(String[])}
|
||||
* throws an exception.
|
||||
*/
|
||||
|
||||
@Test
|
||||
public void main() {
|
||||
CombinatorApp.main(new String[]{});
|
||||
public void shouldExecuteApplicationWithoutException() {
|
||||
assertDoesNotThrow(() -> CombinatorApp.main(new String[]{}));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user