Created
October 7, 2022 13:06
-
-
Save s1monw1/1d78ec1505554ecd4f9f1cfca0f08516 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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