-
-
Save le0nidas/0117f31df4c1e504d928e49310b8eb5e 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
@Test fun `a newly created browser does not have an active URL`() { | |
val browser = Browser(dummyHistory) | |
assertThat(browser.activeURL, absent()) | |
} | |
@Test fun `a visited URL is an active URL`() { | |
val browser = Browser(dummyHistory) | |
browser.visit(URL("https://www.le0nidas.gr")) | |
assertThat(browser.activeURL, equalTo(URL("https://www.le0nidas.gr"))) | |
} | |
private val dummyHistory = object : History { | |
override fun push(url: URL) { | |
} | |
override fun pop(): URL { | |
TODO("Not yet implemented") | |
} | |
override fun peek(): URL { | |
TODO("Not yet implemented") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment