@Test public void testDMNGetNameWhenParentDoesNotHaveName() { final org.kie.dmn.model.api.InformationItem parent = mock(org.kie.dmn.model.api.InformationItem.class); final String name = InformationItemPrimaryPropertyConverter.getParentName(parent); assertTrue(name.isEmpty()); }
static String getParentName(final org.kie.dmn.model.api.DMNModelInstrumentedBase parent) { if (parent instanceof NamedElement) { final NamedElement namedElement = (NamedElement) parent; final Optional<String> name = Optional.ofNullable(namedElement.getName()); return name.orElse(DEFAULT_NAME); } return DEFAULT_NAME; }
InformationItemPrimaryPropertyConverter { static String getParentName(final org.kie.dmn.model.api.DMNModelInstrumentedBase parent) { if (parent instanceof NamedElement) { final NamedElement namedElement = (NamedElement) parent; final Optional<String> name = Optional.ofNullable(namedElement.getName()); return name.orElse(DEFAULT_NAME); } return DEFAULT_NAME; } }
InformationItemPrimaryPropertyConverter { static String getParentName(final org.kie.dmn.model.api.DMNModelInstrumentedBase parent) { if (parent instanceof NamedElement) { final NamedElement namedElement = (NamedElement) parent; final Optional<String> name = Optional.ofNullable(namedElement.getName()); return name.orElse(DEFAULT_NAME); } return DEFAULT_NAME; }  }
InformationItemPrimaryPropertyConverter { static String getParentName(final org.kie.dmn.model.api.DMNModelInstrumentedBase parent) { if (parent instanceof NamedElement) { final NamedElement namedElement = (NamedElement) parent; final Optional<String> name = Optional.ofNullable(namedElement.getName()); return name.orElse(DEFAULT_NAME); } return DEFAULT_NAME; }  static InformationItemPrimary wbFromDMN(final InformationItem dmn,
                                                   final org.kie.dmn.model.api.DMNModelInstrumentedBase parent); static TInformationItem dmnFromWB(final InformationItemPrimary wb,
                                             final DMNModelInstrumentedBase parent); }
InformationItemPrimaryPropertyConverter { static String getParentName(final org.kie.dmn.model.api.DMNModelInstrumentedBase parent) { if (parent instanceof NamedElement) { final NamedElement namedElement = (NamedElement) parent; final Optional<String> name = Optional.ofNullable(namedElement.getName()); return name.orElse(DEFAULT_NAME); } return DEFAULT_NAME; }  static InformationItemPrimary wbFromDMN(final InformationItem dmn,
                                                   final org.kie.dmn.model.api.DMNModelInstrumentedBase parent); static TInformationItem dmnFromWB(final InformationItemPrimary wb,
                                             final DMNModelInstrumentedBase parent);  }