Last active
July 5, 2020 23:01
-
-
Save Garyfimo/5be22072dca8a4dbe57b8d75509eaeab to your computer and use it in GitHub Desktop.
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
import androidx.test.espresso.Espresso.onView | |
import androidx.test.espresso.matcher.ViewMatchers | |
import androidx.test.rule.ActivityTestRule | |
import org.junit.Rule | |
import org.junit.jupiter.api.Assertions.* | |
import org.junit.rules.TestName | |
internal class MainActivityTest{ | |
@get:Rule | |
var activityTestRule = ActivityTestRule(MainActivity::class.java) | |
// Numeros | |
private val btnCero = onView(ViewMatchers.withId((R.id.btnCero))) | |
private val btnUno = onView(ViewMatchers.withId((R.id.btnUno))) | |
private val btnDos = onView(ViewMatchers.withId((R.id.btnDos))) | |
private val btnTres = onView(ViewMatchers.withId((R.id.btnTres))) | |
private val btnCuatro = onView(ViewMatchers.withId((R.id.btnCuatro))) | |
private val btnCinco = onView(ViewMatchers.withId((R.id.btnCinco))) | |
private val btnSeis = onView(ViewMatchers.withId((R.id.btnSeis))) | |
private val btnSiete = onView(ViewMatchers.withId((R.id.btnSiete))) | |
private val btnOcho = onView(ViewMatchers.withId((R.id.btnOcho))) | |
private val btnNueve = onView(ViewMatchers.withId((R.id.btnNueve))) | |
// Operadores | |
private val btnPunto = onView(ViewMatchers.withId((R.id.btnPunto))) | |
private val btnIgual = onView(ViewMatchers.withId((R.id.btnIgual))) | |
private val btnResta = onView(ViewMatchers.withId((R.id.btnResta))) | |
private val btnSuma = onView(ViewMatchers.withId((R.id.btnSuma))) | |
private val btnMultiplicacion = onView(ViewMatchers.withId((R.id.btnMultiplicacion))) | |
private val btnDivision = onView(ViewMatchers.withId((R.id.btnDivision))) | |
// Utilitarios | |
private val btnBorrar = onView(ViewMatchers.withId((R.id.btnBorrar))) | |
private val btnLimpiar = onView(ViewMatchers.withId((R.id.btnLimpiar))) | |
// Visualizador | |
private val tvVisualizadorOperacion = onView(ViewMatchers.withId((R.id.tvVisualizadorOperacion))) | |
private val tvVisualizadorResultado = onView(ViewMatchers.withId((R.id.tvVisualizadorResultado))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment