feat(test/integration): init basic crud tests (4.1)
This commit is contained in:
parent
b01d313c9a
commit
1f9f92ce05
7 changed files with 284 additions and 2 deletions
39
integration-tests/src/test/java/csep/TestModule.java
Normal file
39
integration-tests/src/test/java/csep/TestModule.java
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
package csep;
|
||||
|
||||
import client.scenes.FoodpalApplicationCtrl;
|
||||
import client.scenes.MainCtrl;
|
||||
import client.scenes.SearchBarCtrl;
|
||||
import client.scenes.recipe.IngredientListCtrl;
|
||||
import client.scenes.recipe.RecipeStepListCtrl;
|
||||
import client.utils.*;
|
||||
import com.google.inject.AbstractModule;
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Module;
|
||||
import com.google.inject.Scopes;
|
||||
import com.google.inject.TypeLiteral;
|
||||
import commons.Ingredient;
|
||||
import commons.Recipe;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class TestModule implements Module {
|
||||
@Override
|
||||
public void configure(Binder binder) {
|
||||
binder.bind(MainCtrl.class).in(Scopes.SINGLETON);
|
||||
binder.bind(FoodpalApplicationCtrl.class).in(Scopes.SINGLETON);
|
||||
binder.bind(IngredientListCtrl.class).in(Scopes.SINGLETON);
|
||||
binder.bind(RecipeStepListCtrl.class).in(Scopes.SINGLETON);
|
||||
binder.bind(SearchBarCtrl.class).in(Scopes.SINGLETON);
|
||||
binder.bind(LocaleManager.class).in(Scopes.SINGLETON);
|
||||
binder.bind(ServerUtils.class).in(Scopes.SINGLETON);
|
||||
binder.bind(WebSocketUtils.class).in(Scopes.SINGLETON);
|
||||
|
||||
binder.bind(ConfigService.class).toInstance(new ConfigService(Path.of("config.json")));
|
||||
binder.bind(new TypeLiteral<WebSocketDataService<Long, Recipe>>() {}).toInstance(
|
||||
new WebSocketDataService<>()
|
||||
);
|
||||
binder.bind(new TypeLiteral<WebSocketDataService<Long, Ingredient>>() {}).toInstance(
|
||||
new WebSocketDataService<>()
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue