Fix tests

This commit is contained in:
Johannes Frohnmeyer 2022-06-07 13:59:03 +02:00
parent 6d8c06f26d
commit ac4d8efe3e
Signed by: Johannes
GPG Key ID: E76429612C2929F4
2 changed files with 5 additions and 5 deletions

View File

@ -2,8 +2,7 @@ package io.gitlab.jfronny.respackopts;
import io.gitlab.jfronny.gson.reflect.*; import io.gitlab.jfronny.gson.reflect.*;
import io.gitlab.jfronny.muscript.*; import io.gitlab.jfronny.muscript.*;
import io.gitlab.jfronny.muscript.compiler.*; import io.gitlab.jfronny.muscript.compiler.expr.*;
import io.gitlab.jfronny.muscript.optic.*;
import io.gitlab.jfronny.respackopts.gson.*; import io.gitlab.jfronny.respackopts.gson.*;
import io.gitlab.jfronny.respackopts.model.*; import io.gitlab.jfronny.respackopts.model.*;
import io.gitlab.jfronny.respackopts.util.*; import io.gitlab.jfronny.respackopts.util.*;
@ -104,7 +103,7 @@ class ConditionJsonSerializationTest {
} }
private boolean evaluateCondition(String json) { private boolean evaluateCondition(String json) {
Expr.BoolExpr condition = AttachmentHolder.attach(7, () -> GSON.fromJson(json, Expr.BoolExpr.class)); BoolExpr condition = AttachmentHolder.attach(7, () -> GSON.fromJson(json, BoolExpr.class));
return condition.get(MetaCache.hydrateParameter(new ExpressionParameter())); return condition.get(MetaCache.hydrateParameter(new ExpressionParameter()));
} }
} }

View File

@ -1,6 +1,7 @@
package io.gitlab.jfronny.respackopts; package io.gitlab.jfronny.respackopts;
import io.gitlab.jfronny.gson.*; import io.gitlab.jfronny.gson.*;
import io.gitlab.jfronny.muscript.compiler.expr.*;
import io.gitlab.jfronny.respackopts.gson.*; import io.gitlab.jfronny.respackopts.gson.*;
import io.gitlab.jfronny.respackopts.gson.entry.*; import io.gitlab.jfronny.respackopts.gson.entry.*;
import io.gitlab.jfronny.respackopts.model.tree.*; import io.gitlab.jfronny.respackopts.model.tree.*;
@ -12,8 +13,8 @@ public class TemplateTree {
.registerTypeAdapter(ConfigBooleanEntry.class, new BooleanEntrySerializer()) .registerTypeAdapter(ConfigBooleanEntry.class, new BooleanEntrySerializer())
.registerTypeAdapter(ConfigBranch.class, new ConfigBranchSerializer()) .registerTypeAdapter(ConfigBranch.class, new ConfigBranchSerializer())
.registerTypeAdapter(Expr.class, new ExprDeserializer()) .registerTypeAdapter(Expr.class, new ExprDeserializer())
.registerTypeAdapter(Expr.StringExpr.class, new StringExprDeserializer()) .registerTypeAdapter(StringExpr.class, new StringExprDeserializer())
.registerTypeAdapter(Expr.BoolExpr.class, new BoolExprDeserializer()) .registerTypeAdapter(BoolExpr.class, new BoolExprDeserializer())
.setLenient() .setLenient()
.setPrettyPrinting() .setPrettyPrinting()
.create(); .create();