Added linting to build.
This commit is contained in:
parent
185f258b6f
commit
a52da46f52
@ -161,6 +161,20 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.github.gantsign.maven</groupId>
|
||||||
|
<artifactId>ktlint-maven-plugin</artifactId>
|
||||||
|
<version>0.9.14</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>format-and-check</id>
|
||||||
|
<goals>
|
||||||
|
<goal>format</goal>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.0</version>
|
||||||
|
@ -133,8 +133,7 @@ class ControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testGetObservationsForTutor_NoTutor()
|
fun testGetObservationsForTutor_NoTutor() {
|
||||||
{
|
|
||||||
doReturn(Optional.ofNullable(null)).`when`(tutorRepository).findById(1)
|
doReturn(Optional.ofNullable(null)).`when`(tutorRepository).findById(1)
|
||||||
val result = controller.getObservationsForTutor(1)
|
val result = controller.getObservationsForTutor(1)
|
||||||
assertTrue(result.isEmpty())
|
assertTrue(result.isEmpty())
|
||||||
@ -152,5 +151,4 @@ class ControllerTest {
|
|||||||
val result = controller.addObservation(newData)
|
val result = controller.addObservation(newData)
|
||||||
assertEquals(1L, result)
|
assertEquals(1L, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -18,5 +18,4 @@ class ObservationDatabaseApplicationTests {
|
|||||||
fun contextLoads() {
|
fun contextLoads() {
|
||||||
assertNotNull(controller)
|
assertNotNull(controller)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,6 @@ import org.springframework.test.context.junit4.SpringRunner
|
|||||||
import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager
|
import org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager
|
||||||
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.beans.factory.annotation.Autowired
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RunWith(SpringRunner::class)
|
@RunWith(SpringRunner::class)
|
||||||
@DataJpaTest
|
@DataJpaTest
|
||||||
class RepositoryTest {
|
class RepositoryTest {
|
||||||
|
Loading…
Reference in New Issue
Block a user