DanglingLineAdapter extends AbstractInjectionAdapter<DanglingLine> implements DanglingLine { @Override public String getUcteXnodeCode() { return getDelegate().getUcteXnodeCode(); } DanglingLineAdapter(final DanglingLine delegate, final MergingViewIndex index); @Override double getP0(); @Override DanglingLine setP0(final double p0); @Override double getQ0(); @Override DanglingLine setQ0(final double q0); @Override double getR(); @Override DanglingLine setR(final double r); @Override double getX(); @Override DanglingLine setX(final double x); @Override double getG(); @Override DanglingLine setG(final double g); @Override double getB(); @Override DanglingLine setB(final double b); @Override Generation getGeneration(); @Override String getUcteXnodeCode(); @Override CurrentLimits getCurrentLimits(); @Override CurrentLimitsAdder newCurrentLimits();  }
@Test public void testProperties() { final DanglingLine dl1 = createDanglingLine(noEquipNetwork, "vl1", "dl1", "dl", 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, "code", "busA"); dl1.setProperty("ucteCode", dl1.getUcteXnodeCode()); dl1.setProperty("id", dl1.getId()); dl1.setProperty("network", "noEquipNetwork"); dl1.setProperty("vl", ""); final DanglingLine dl2 = createDanglingLine(noEquipNetwork, "vl2", "dl2", "dl", 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, "code", "busB"); dl2.setProperty("ucteCode", dl2.getUcteXnodeCode()); dl2.setProperty("id", dl2.getId()); dl2.setProperty("network", ""); dl2.setProperty("vl", "vl2"); mergingView.merge(noEquipNetwork); final Line line = mergingView.getLine("dl1 + dl2"); final MergedLine mergedLine = (MergedLine) line; assertEquals("dl", mergedLine.getOptionalName().orElse(null)); assertEquals("dl", mergedLine.getNameOrId()); assertTrue(mergedLine.hasProperty()); assertTrue(mergedLine.hasProperty("ucteCode")); assertEquals(3, mergedLine.getPropertyNames().size()); mergedLine.setProperty("key", "value"); assertEquals("value", mergedLine.getProperty("key")); assertEquals("defaultValue", mergedLine.getProperty("noKey", "defaultValue")); }