@Test public void testWbChildFromDMNWhenWbChildIsNotNull() { final String id = "id"; final String name = "name"; final String typeLanguage = "typeLanguage"; final boolean isCollection = true; final boolean isOnlyVisualChanges = false; final String description = "description"; final ItemDefinition expectedWbParent = new ItemDefinition(); final ItemDefinition expectedWbChild = new ItemDefinition(new Id(id), new Description(description), new Name(name), null, null, null, typeLanguage, isCollection, isOnlyVisualChanges); final org.kie.dmn.model.api.ItemDefinition dmnChild = mock(org.kie.dmn.model.api.ItemDefinition.class); when(dmnChild.getId()).thenReturn(id); when(dmnChild.getName()).thenReturn(name); when(dmnChild.getTypeLanguage()).thenReturn(typeLanguage); when(dmnChild.isIsCollection()).thenReturn(isCollection); when(dmnChild.getDescription()).thenReturn(description); when(dmnChild.getTypeRef()).thenReturn(null); final ItemDefinition actualWbChild = wbChildFromDMN(expectedWbParent, dmnChild); final ItemDefinition actualParent = (ItemDefinition) actualWbChild.getParent(); assertEquals(expectedWbChild, actualWbChild); assertEquals(expectedWbParent, actualParent); }
static ItemDefinition wbChildFromDMN(final ItemDefinition wbParent, final org.kie.dmn.model.api.ItemDefinition dmnChild) { final ItemDefinition wbChild = wbFromDMN(dmnChild); if (wbChild != null) { wbChild.setParent(wbParent); } return wbChild; }
ItemDefinitionPropertyConverter { static ItemDefinition wbChildFromDMN(final ItemDefinition wbParent, final org.kie.dmn.model.api.ItemDefinition dmnChild) { final ItemDefinition wbChild = wbFromDMN(dmnChild); if (wbChild != null) { wbChild.setParent(wbParent); } return wbChild; } }
ItemDefinitionPropertyConverter { static ItemDefinition wbChildFromDMN(final ItemDefinition wbParent, final org.kie.dmn.model.api.ItemDefinition dmnChild) { final ItemDefinition wbChild = wbFromDMN(dmnChild); if (wbChild != null) { wbChild.setParent(wbParent); } return wbChild; }  }
ItemDefinitionPropertyConverter { static ItemDefinition wbChildFromDMN(final ItemDefinition wbParent, final org.kie.dmn.model.api.ItemDefinition dmnChild) { final ItemDefinition wbChild = wbFromDMN(dmnChild); if (wbChild != null) { wbChild.setParent(wbParent); } return wbChild; }  static ItemDefinition wbFromDMN(final org.kie.dmn.model.api.ItemDefinition dmn); static org.kie.dmn.model.api.ItemDefinition dmnFromWB(final ItemDefinition wb); }
ItemDefinitionPropertyConverter { static ItemDefinition wbChildFromDMN(final ItemDefinition wbParent, final org.kie.dmn.model.api.ItemDefinition dmnChild) { final ItemDefinition wbChild = wbFromDMN(dmnChild); if (wbChild != null) { wbChild.setParent(wbParent); } return wbChild; }  static ItemDefinition wbFromDMN(final org.kie.dmn.model.api.ItemDefinition dmn); static org.kie.dmn.model.api.ItemDefinition dmnFromWB(final ItemDefinition wb);  }