Created
September 22, 2022 15:52
-
-
Save GeePawHill/4ccd8718129723be636e324808f54682 to your computer and use it in GitHub Desktop.
Second rework of test.
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 `sulfuras never changes`() { | |
val item = updateQuality(Item(SULFURUS_NAME, Int.MAX_VALUE, 80)) | |
with(item) { | |
assertThat(name).isEqualTo(SULFURUS_NAME) | |
assertThat(sellIn).isEqualTo(Int.MAX_VALUE) | |
assertThat(quality).isEqualTo(80) | |
} | |
} | |
fun updateQuality(item:Item):Item { | |
val items = arrayOf(item) | |
val app = GildedRose(items) | |
app.updateQuality() | |
return app.items[0] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment