Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created October 7, 2022 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s1monw1/1d78ec1505554ecd4f9f1cfca0f08516 to your computer and use it in GitHub Desktop.
Save s1monw1/1d78ec1505554ecd4f9f1cfca0f08516 to your computer and use it in GitHub Desktop.
import com.natpryce.hamkrest.assertion.assertThat
import org.http4k.core.Method
import org.http4k.core.Request
import org.http4k.core.Status
import org.http4k.hamkrest.hasStatus
import org.junit.jupiter.api.Test
class PersonHandlerProviderTest {
val systemUnderTest = PersonHandlerProvider(PersonService())
@Test
fun getAll_handler_can_be_invoked_as_expected(){
val getAll: HttpHandler = systemUnderTest.getAllHandler()
val result: Response = getAll(Request(Method.GET, "/some-uri"))
assertThat(result, hasStatus(Status.OK))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment