@Test public void filterTestWithPartMasterAsParameter(){ List<PartIteration> result = releasedPSFilter.filter(getPartMasterWith("PART-001")); assertFalse(result.isEmpty()); assertEquals(6,result.size()); assertEquals("K",result.get(0).getPartVersion()); assertEquals("J",result.get(1).getPartVersion()); assertEquals("H",result.get(2).getPartVersion()); assertEquals("G",result.get(3).getPartVersion()); assertEquals("D",result.get(4).getPartVersion()); assertEquals("B", result.get(5).getPartVersion()); }
@Override public List<PartIteration> filter(PartMaster part) { List<PartIteration> partIterations = new ArrayList<>(); List<PartRevision> partRevisions = part.getAllReleasedRevisions(); for(PartRevision partRevision: partRevisions){ partIterations.add(partRevision.getLastIteration()); } return partIterations; }
ReleasedPSFilter implements ProductStructureFilter, Serializable { @Override public List<PartIteration> filter(PartMaster part) { List<PartIteration> partIterations = new ArrayList<>(); List<PartRevision> partRevisions = part.getAllReleasedRevisions(); for(PartRevision partRevision: partRevisions){ partIterations.add(partRevision.getLastIteration()); } return partIterations; } }
ReleasedPSFilter implements ProductStructureFilter, Serializable { @Override public List<PartIteration> filter(PartMaster part) { List<PartIteration> partIterations = new ArrayList<>(); List<PartRevision> partRevisions = part.getAllReleasedRevisions(); for(PartRevision partRevision: partRevisions){ partIterations.add(partRevision.getLastIteration()); } return partIterations; } ReleasedPSFilter(boolean diverge); }
ReleasedPSFilter implements ProductStructureFilter, Serializable { @Override public List<PartIteration> filter(PartMaster part) { List<PartIteration> partIterations = new ArrayList<>(); List<PartRevision> partRevisions = part.getAllReleasedRevisions(); for(PartRevision partRevision: partRevisions){ partIterations.add(partRevision.getLastIteration()); } return partIterations; } ReleasedPSFilter(boolean diverge); @Override List<PartIteration> filter(PartMaster part); @Override List<PartLink> filter(List<PartLink> path); }
ReleasedPSFilter implements ProductStructureFilter, Serializable { @Override public List<PartIteration> filter(PartMaster part) { List<PartIteration> partIterations = new ArrayList<>(); List<PartRevision> partRevisions = part.getAllReleasedRevisions(); for(PartRevision partRevision: partRevisions){ partIterations.add(partRevision.getLastIteration()); } return partIterations; } ReleasedPSFilter(boolean diverge); @Override List<PartIteration> filter(PartMaster part); @Override List<PartLink> filter(List<PartLink> path);  }