Skip to content

Commit

Permalink
Merge branch 'feature/500238-BuscarPorTipologiaDeCombustible' into de…
Browse files Browse the repository at this point in the history
…velop
  • Loading branch information
ZamukoCG committed Nov 17, 2024
2 parents f6c9a88 + c44d92f commit 48d7782
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public List<Gasolinera> filtrarPorProvinciaYMunicipio(List<Gasolinera> gasoliner
List<Gasolinera> resultado = new ArrayList<>();

if (gasolineras.isEmpty()) {
return null;
return resultado;
}

if (provincia != null && municipio != null) {
Expand Down Expand Up @@ -152,6 +152,8 @@ public List<Gasolinera> filtrarPorCombustibles(List<Gasolinera> gasolineras, Lis
anhadida = true;
}
break;
default:
break;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

public class Tiempo {



private Tiempo() {
throw new UnsupportedOperationException("Cannot instantiate Tiempo class");
}
/**
* Obtiene la hora actual
* @return la hora actual
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
* Utility methods that may be used by several classes
*/
public class Utils {

private Utils() {
throw new UnsupportedOperationException("Cannot instantiate Utils class");
}
/**
* Parses a list of gas stations from a json resource file.
* The json must contain a serialized GasolinerasResponse object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
@InstallIn(ActivityComponent.class)
public abstract class RepositoriesModule {


private RepositoriesModule() {
throw new UnsupportedOperationException("Cannot instantiate RepositoriesModule class");
}

@Provides
public static IGasolinerasRepository provideRepository() {
return GasolinerasRepository.INSTANCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

import com.google.gson.annotations.SerializedName;

import es.unican.gasolineras.common.DataAccessException;
import es.unican.gasolineras.common.Horario;
import org.parceler.Parcel;
import java.util.Date;
import java.util.Calendar;
import lombok.Getter;
import lombok.Setter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
*/
public class GasolinerasService {

private GasolinerasService() {
throw new UnsupportedOperationException("Cannot instantiate GasolinerasService class");
}

/** Open Charge Map API base URL*/
final static String BASE_URL = "https://sedeaplicaciones.minetur.gob.es/ServiciosRESTCarburantes/PreciosCarburantes/";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.List;

import es.unican.gasolineras.model.Gasolinera;

/**
* The callback used by the repository to asynchronously retrieve gas stations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public void testUD1H() {
@Test
public void testUD1I() {
List<Gasolinera> resultado = filtros.filtrarPorProvinciaYMunicipio(Collections.emptyList(), "Cantabria", "Santander");
assertNull(resultado);
assertEquals(resultado, Collections.emptyList());
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import es.unican.gasolineras.activities.main.IMainContract;
import es.unican.gasolineras.activities.main.MainPresenter;
import es.unican.gasolineras.common.DataAccessException;
import es.unican.gasolineras.common.IFiltros;
import es.unican.gasolineras.utils.MockRepositories;
import es.unican.gasolineras.repository.IGasolinerasRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import es.unican.gasolineras.activities.main.IMainContract;
import es.unican.gasolineras.activities.main.MainPresenter;
import es.unican.gasolineras.common.DataAccessException;
import es.unican.gasolineras.model.Gasolinera;
import es.unican.gasolineras.repository.IGasolinerasRepository;

Expand Down

0 comments on commit 48d7782

Please sign in to comment.