feat(test/integration): init basic crud tests (4.1)

This commit is contained in:
Zhongheng Liu 2026-01-07 16:59:24 +01:00
commit 1f9f92ce05
Signed by: steven
GPG key ID: F69B980899C1C09D
7 changed files with 284 additions and 2 deletions

View 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<>()
);
}
}