Map identities to proper objects
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / test / java / org / opendaylight / mdsal / binding / java / api / generator / Mdsal732Test.java
index 2c214bfaee4afeea4a18e27b9e751cb8e13c722c..f05db66943d224f126a2ef1e5d3abbaec14a1ffe 100644 (file)
@@ -41,17 +41,17 @@ public class Mdsal732Test extends BaseCompilationTest {
         final var content = Files.readString(xyzzyBuilder.toPath());
         FileSearchUtil.assertFileContainsConsecutiveLines(xyzzyBuilder, content,
             "    public XyzzyBuilder(Grp arg) {",
-            "        this._foo = CodeHelpers.checkFieldCastIdentity(Foo.class, \"foo\", arg.getFoo());",
-            "        this._bar = CodeHelpers.checkSetFieldCastIdentity(Foo.class, \"bar\", arg.getBar());",
-            "        this._baz = CodeHelpers.checkListFieldCastIdentity(Foo.class, \"baz\", arg.getBaz());",
+            "        this._foo = CodeHelpers.checkFieldCast(Foo.class, \"foo\", arg.getFoo());",
+            "        this._bar = CodeHelpers.checkSetFieldCast(Foo.class, \"bar\", arg.getBar());",
+            "        this._baz = CodeHelpers.checkListFieldCast(Foo.class, \"baz\", arg.getBaz());",
             "    }");
         FileSearchUtil.assertFileContainsConsecutiveLines(xyzzyBuilder, content,
             "    public void fieldsFrom(DataObject arg) {",
             "        boolean isValidArg = false;",
             "        if (arg instanceof Grp) {",
-            "            this._foo = CodeHelpers.checkFieldCastIdentity(Foo.class, \"foo\", ((Grp)arg).getFoo());",
-            "            this._bar = CodeHelpers.checkSetFieldCastIdentity(Foo.class, \"bar\", ((Grp)arg).getBar());",
-            "            this._baz = CodeHelpers.checkListFieldCastIdentity(Foo.class, \"baz\", ((Grp)arg).getBaz());",
+            "            this._foo = CodeHelpers.checkFieldCast(Foo.class, \"foo\", ((Grp)arg).getFoo());",
+            "            this._bar = CodeHelpers.checkSetFieldCast(Foo.class, \"bar\", ((Grp)arg).getBar());",
+            "            this._baz = CodeHelpers.checkListFieldCast(Foo.class, \"baz\", ((Grp)arg).getBaz());",
             "            isValidArg = true;",
             "        }",
             "        CodeHelpers.validValue(isValidArg, arg, \"[Grp]\");",