import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class GetThingsDoneApplication
fun main(args: Array<String>) {
runApplication<GetThingsDoneApplication>(*args)
}
I am trying to push my test coverage for my project to 100%. But I don't know how to write a test for main(args: Array<String>)
I guess the Test Class and method should look something like this:
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
@ContextConfiguration(classes = [GetThingsDoneApplication::class])
class GetThingsDoneApplicationIntegrationTest {
@Test
fun contextLoads() {
main(doSomething())
}
private fun doSomething(): Array<String> {
return arrayOf<String>()
}
}
The question is now, how should my assertThat
look like, to have 100% test coverage?