fixed Tests

This commit is contained in:
Leonie Eitze
2023-06-15 19:11:30 +02:00
parent 5204cc1710
commit fc4f5c6fc6
4 changed files with 13 additions and 7 deletions

View File

@@ -1,6 +1,9 @@
package de.rwu.easydrop.core;
import java.util.List;
import javax.naming.ConfigurationException;
import de.rwu.easydrop.model.Offer;
public class Core {
@@ -11,7 +14,7 @@ public class Core {
private OfferUpdater update;
public Core(){
public Core() throws ConfigurationException{
this.ident = new OfferIdentifier();
this.provis = new OfferProvisioner();
this.review = new OfferReviewer();

View File

@@ -1,5 +1,6 @@
package de.rwu.easydrop.core;
import de.rwu.easydrop.api.client.DataSourceFactory;
import de.rwu.easydrop.model.Offer;
import de.rwu.easydrop.model.Product;
import de.rwu.easydrop.model.ProductCatalogue;
@@ -20,7 +21,11 @@ public class OfferIdentifier {
ProductRetriever productRetriever;
public OfferIdentifier() {}
public OfferIdentifier() throws ConfigurationException{
this.offerRetriever = new OfferRetriever();
DataSourceFactory dataSourceFactory = new DataSourceFactory(Config.getInstance());
this.productRetriever= new ProductRetriever(dataSourceFactory);
}
public List<Offer> runIdentifier() {
/* muss die Kataloge durchforsten nach vergleichbaren Produkten auf mehreren Händlerwebseiten (APIs)

View File

@@ -1,9 +1,5 @@
package de.rwu.easydrop.service.validation;
import java.util.HashSet;
import java.util.Set;
import de.rwu.easydrop.exception.InvalidProductException;
import de.rwu.easydrop.model.Product;
import de.rwu.easydrop.model.Offer;
/**