Skip to content

Commit

Permalink
Terminados todos los test de ordenar
Browse files Browse the repository at this point in the history
  • Loading branch information
scg194 committed Oct 23, 2024
1 parent 0df6929 commit 5c0ad0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
Expand Down Expand Up @@ -103,7 +104,7 @@ public void testOrdenaGasolinerasCercanasCasoExito() {
g1.onChildView(withId(R.id.tvAddress)).check(matches(withText("CALLE CORREOS, SN")));

//comprueba la direccion de la segunda gasolinera
DataInteraction g2 = onData(anything()).inAdapterView(withId(R.id.lvStations)).atPosition(0);
DataInteraction g2 = onData(anything()).inAdapterView(withId(R.id.lvStations)).atPosition(1);
g2.onChildView(withId(R.id.tvAddress)).check(matches(withText("CARRETERA 634 KM. 244")));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
import es.unican.gasolineras.R;
import es.unican.gasolineras.activities.main.MainView;
import es.unican.gasolineras.injection.RepositoriesModule;
import es.unican.gasolineras.repository.AppDatabase;
import es.unican.gasolineras.repository.DbFunctions;
import es.unican.gasolineras.repository.IGasolinerasRepository;
import es.unican.gasolineras.repository.IPuntosInteresDAO;

@UninstallModules(RepositoriesModule.class)
@HiltAndroidTest
Expand All @@ -59,7 +62,9 @@ public class AnhadirPuntoInteresUITest {
public void setUp() {

activityRule.getScenario().onActivity(activity -> decorView = activity.getWindow().getDecorView());

AppDatabase db = DbFunctions.generaBaseDatosPuntosInteres(context.getApplicationContext());
IPuntosInteresDAO puntosInteresDao = db.puntosInteresDao();
puntosInteresDao.deleteAll();
}

@Test
Expand Down

0 comments on commit 5c0ad0c

Please sign in to comment.