@Test public void testGetHasTypeRefs() { final InformationItem column1 = mock(InformationItem.class); final InformationItem column2 = mock(InformationItem.class); final List<InformationItem> column = asList(column1, column2); final org.kie.workbench.common.dmn.api.definition.model.List row1 = mock(org.kie.workbench.common.dmn.api.definition.model.List.class); final org.kie.workbench.common.dmn.api.definition.model.List row2 = mock(org.kie.workbench.common.dmn.api.definition.model.List.class); final List<org.kie.workbench.common.dmn.api.definition.model.List> row = asList(row1, row2); final HasTypeRef hasTypeRef1 = mock(HasTypeRef.class); final HasTypeRef hasTypeRef2 = mock(HasTypeRef.class); final HasTypeRef hasTypeRef3 = mock(HasTypeRef.class); final HasTypeRef hasTypeRef4 = mock(HasTypeRef.class); doReturn(column).when(relation).getColumn(); doReturn(row).when(relation).getRow(); when(column1.getHasTypeRefs()).thenReturn(asList(hasTypeRef1)); when(column2.getHasTypeRefs()).thenReturn(asList(hasTypeRef2)); when(row1.getHasTypeRefs()).thenReturn(asList(hasTypeRef3)); when(row2.getHasTypeRefs()).thenReturn(asList(hasTypeRef4)); final List<HasTypeRef> actualHasTypeRefs = relation.getHasTypeRefs(); final List<HasTypeRef> expectedHasTypeRefs = asList(relation, hasTypeRef1, hasTypeRef2, hasTypeRef3, hasTypeRef4); assertEquals(expectedHasTypeRefs, actualHasTypeRefs); }
@Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefs(getColumn())); hasTypeRefs.addAll(getFlatHasTypeRefs(getRow())); return hasTypeRefs; }
Relation extends Expression { @Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefs(getColumn())); hasTypeRefs.addAll(getFlatHasTypeRefs(getRow())); return hasTypeRefs; } }
Relation extends Expression { @Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefs(getColumn())); hasTypeRefs.addAll(getFlatHasTypeRefs(getRow())); return hasTypeRefs; } Relation();  Relation(final Id id,
                    final Description description,
                    final QName typeRef,
                    final java.util.List<InformationItem> column,
                    final java.util.List<List> row); }
Relation extends Expression { @Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefs(getColumn())); hasTypeRefs.addAll(getFlatHasTypeRefs(getRow())); return hasTypeRefs; } Relation();  Relation(final Id id,
                    final Description description,
                    final QName typeRef,
                    final java.util.List<InformationItem> column,
                    final java.util.List<List> row); @Override Relation copy(); java.util.List<InformationItem> getColumn(); java.util.List<List> getRow(); @Override java.util.List<HasTypeRef> getHasTypeRefs(); @Override int getRequiredComponentWidthCount(); @Override boolean equals(final Object o); @Override int hashCode(); }
Relation extends Expression { @Override public java.util.List<HasTypeRef> getHasTypeRefs() { final java.util.List<HasTypeRef> hasTypeRefs = super.getHasTypeRefs(); hasTypeRefs.addAll(getFlatHasTypeRefs(getColumn())); hasTypeRefs.addAll(getFlatHasTypeRefs(getRow())); return hasTypeRefs; } Relation();  Relation(final Id id,
                    final Description description,
                    final QName typeRef,
                    final java.util.List<InformationItem> column,
                    final java.util.List<List> row); @Override Relation copy(); java.util.List<InformationItem> getColumn(); java.util.List<List> getRow(); @Override java.util.List<HasTypeRef> getHasTypeRefs(); @Override int getRequiredComponentWidthCount(); @Override boolean equals(final Object o); @Override int hashCode(); static final int STATIC_COLUMNS; }