Created
May 16, 2018 12:32
-
-
Save enginebai/903ba706ff5e69b24a3b3ed3eacc6e93 to your computer and use it in GitHub Desktop.
ArchiveTTest
This file contains hidden or 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
| package com.machipopo.swag.feature.profile.archive | |
| import org.junit.Before | |
| import org.junit.Test | |
| import org.mockito.Mock | |
| import org.mockito.Mockito | |
| class ArchiveTTest { | |
| @Before | |
| fun setUp() { | |
| // init mock instance | |
| } | |
| @Test | |
| fun `when load archive then view show list`() { | |
| // arrange | |
| val view = ArchiveTView() | |
| val repo = ArchiveTRepo() | |
| val target = ArchiveTPresenter(view, repo) | |
| val actaul = listOf<ArchiveT>(item) | |
| Mockito.`when`(repo.getArchives()).thenReturn(actaul) | |
| //act | |
| target.getArchives() | |
| //assert | |
| Mockito.verify(view).showArchives(actaul) | |
| } | |
| @Test | |
| fun `when load archive is empty then view show empty view`() { | |
| TODO("not implemented") //To change body of created functions use File | Settings | File Templates. | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment