#78 fixed sonar smells

This commit is contained in:
Fabio Formosa
2022-10-28 23:53:33 +02:00
parent 33b4d88d52
commit 540bdf35a5
4 changed files with 20 additions and 3 deletions

View File

@@ -1,6 +1,9 @@
package it.fabioformosa.quartzmanager.api;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.quartz.Scheduler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.ComponentScan;
@@ -8,8 +11,12 @@ import org.springframework.context.annotation.ComponentScan;
@SpringBootConfiguration
public class QuartManagerApplicationTests {
@Autowired
private Scheduler scheduler;
@Test
public void contextLoads() {
Assertions.assertThat(scheduler).isNotNull();
}
}

View File

@@ -27,6 +27,4 @@ class TriggerControllerTest {
Mockito.reset(triggerService);
}
}

View File

@@ -9,7 +9,7 @@ import org.springframework.util.MultiValueMap;
import static it.fabioformosa.quartzmanager.api.common.config.QuartzManagerPaths.QUARTZ_MANAGER_LOGIN_PATH;
public class AbstractSecurityLoginTest {
public abstract class AbstractSecurityLoginTest {
@Autowired
private TestRestTemplate testRestTemplate;

View File

@@ -1,7 +1,19 @@
package it.fabioformosa.quartzmanager.api.security;
import it.fabioformosa.quartzmanager.api.security.controllers.TestController;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringApplicationTest {
@Autowired
private TestController testController;
@Test
public void contextLoad(){
Assertions.assertThat(testController).isNotNull();
}
}