Fixed most reported issues by SonarCloud.
This commit is contained in:
@ -47,6 +47,7 @@ public class Promise<T> extends PromiseSupport<T> {
|
||||
* Creates a promise that will be fulfilled in future.
|
||||
*/
|
||||
public Promise() {
|
||||
// Empty constructor
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,13 +26,15 @@ package com.iluwatar.promise;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
|
||||
/**
|
||||
* Application test.
|
||||
*/
|
||||
public class AppTest {
|
||||
class AppTest {
|
||||
|
||||
@Test
|
||||
public void testApp() throws InterruptedException, ExecutionException {
|
||||
App.main(null);
|
||||
void shouldExecuteApplicationWithoutException() {
|
||||
assertDoesNotThrow(() -> App.main(null));
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public class PromiseTest {
|
||||
|
||||
@Test
|
||||
public void promiseIsFulfilledWithAnExceptionIfTaskThrowsAnException()
|
||||
throws InterruptedException, TimeoutException {
|
||||
throws InterruptedException {
|
||||
testWaitingForeverForPromiseToBeFulfilled();
|
||||
testWaitingSomeTimeForPromiseToBeFulfilled();
|
||||
}
|
||||
|
Reference in New Issue
Block a user