Skip to content

Add test to MovieViewModel#79

Open
davthecodercom wants to merge 1 commit into
developfrom
feature/MovieViewModelTest
Open

Add test to MovieViewModel#79
davthecodercom wants to merge 1 commit into
developfrom
feature/MovieViewModelTest

Conversation

@davthecodercom
Copy link
Copy Markdown
Collaborator

Porfavor, incluye este checklist basico para validar el pull request.

Nombre del branch:

Descripcion

Pull request checklist:

  • El codigo incluye Unit Test
  • El codigo compila almenos 2 veces antes de crear este pull request
  • He realizado cambios en la wiki si es necesario
  • El codigo incluido puede romper la app
  • has avisado al equipo en Slack sobre el Pull Request

}

private fun handleMoviesResponse(movies: List<Movie>) {
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No conocía esto... mola!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jajaja, ya te digo, yo creo que es lo que mas uso en testing.

import org.mockito.Mockito.*
import org.mockito.junit.MockitoJUnitRunner

@RunWith(MockitoJUnitRunner.Silent::class)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Para qué sirve lo de Silent?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hay un error de logs de Mokito sobre extra stubs. he buscado y dicen que es un error de Mokito, asi que con Silent silencias esos extra logs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chachi. Gracias!

Copy link
Copy Markdown
Collaborator

@soygabimoreno soygabimoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muy guay!!

@davthecodercom davthecodercom changed the title Add test to MoviewViewModel Add test to MovieViewModel Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants