Last active
February 9, 2019 09:36
-
-
Save CesarValiente/7dc2c9bb3527ad96d9e912fdc803124a 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 should_reduceItemsCollection_when_CreateItemAction_and_empty_collection() { | |
val createItemAction = CreateItemAction( | |
localId = LOCAL_ID, | |
text = TEXT, | |
favorite = FAVORITE, | |
color = COLOR, | |
position = POSITION) | |
val itemsReduced = CreationReducer.reduceItemsCollection( | |
action = createItemAction, | |
currentItems = emptyList()) | |
assertThat(itemsReduced, iz(not(emptyList()))) | |
assertThat(itemsReduced.count(), iz(1)) | |
assertThat(itemsReduced, iz(listOf( | |
Item(localId = LOCAL_ID, | |
text = TEXT, favorite = FAVORITE, color = COLOR, | |
position = POSITION)))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment