@Test(expected = IllegalArgumentException.class) public void testBadSofaMapping() { AggregateBuilder builder = new AggregateBuilder(); builder.addSofaMapping("name", ViewNames.PARENTHESES_VIEW, "A"); }
public void addSofaMapping(String componentName, String componentViewName, String aggregateViewName) { if (componentNames.contains(componentName)) { sofaMappings.add(SofaMappingFactory.createSofaMapping(componentName, componentViewName, aggregateViewName)); } else { throw new IllegalArgumentException("No component with the name '" + componentName + "' has been added to this builder. Sofa mappings may only be added for " + "components that have been added to this builder. "); } }
AggregateBuilder { public void addSofaMapping(String componentName, String componentViewName, String aggregateViewName) { if (componentNames.contains(componentName)) { sofaMappings.add(SofaMappingFactory.createSofaMapping(componentName, componentViewName, aggregateViewName)); } else { throw new IllegalArgumentException("No component with the name '" + componentName + "' has been added to this builder. Sofa mappings may only be added for " + "components that have been added to this builder. "); } } }
AggregateBuilder { public void addSofaMapping(String componentName, String componentViewName, String aggregateViewName) { if (componentNames.contains(componentName)) { sofaMappings.add(SofaMappingFactory.createSofaMapping(componentName, componentViewName, aggregateViewName)); } else { throw new IllegalArgumentException("No component with the name '" + componentName + "' has been added to this builder. Sofa mappings may only be added for " + "components that have been added to this builder. "); } } AggregateBuilder();  AggregateBuilder(TypeSystemDescription typeSystemDescription,
          TypePriorities typePriorities, FlowControllerDescription flowControllerDescription); }
AggregateBuilder { public void addSofaMapping(String componentName, String componentViewName, String aggregateViewName) { if (componentNames.contains(componentName)) { sofaMappings.add(SofaMappingFactory.createSofaMapping(componentName, componentViewName, aggregateViewName)); } else { throw new IllegalArgumentException("No component with the name '" + componentName + "' has been added to this builder. Sofa mappings may only be added for " + "components that have been added to this builder. "); } } AggregateBuilder();  AggregateBuilder(TypeSystemDescription typeSystemDescription,
          TypePriorities typePriorities, FlowControllerDescription flowControllerDescription); String add(AnalysisEngineDescription aed, String... viewNames); void add(String componentName, AnalysisEngineDescription aed, String... viewNames); void addSofaMapping(String componentName, String componentViewName,
          String aggregateViewName); void setFlowControllerDescription(FlowControllerDescription flowControllerDescription); AnalysisEngine createAggregate(); AnalysisEngineDescription createAggregateDescription(); }
AggregateBuilder { public void addSofaMapping(String componentName, String componentViewName, String aggregateViewName) { if (componentNames.contains(componentName)) { sofaMappings.add(SofaMappingFactory.createSofaMapping(componentName, componentViewName, aggregateViewName)); } else { throw new IllegalArgumentException("No component with the name '" + componentName + "' has been added to this builder. Sofa mappings may only be added for " + "components that have been added to this builder. "); } } AggregateBuilder();  AggregateBuilder(TypeSystemDescription typeSystemDescription,
          TypePriorities typePriorities, FlowControllerDescription flowControllerDescription); String add(AnalysisEngineDescription aed, String... viewNames); void add(String componentName, AnalysisEngineDescription aed, String... viewNames); void addSofaMapping(String componentName, String componentViewName,
          String aggregateViewName); void setFlowControllerDescription(FlowControllerDescription flowControllerDescription); AnalysisEngine createAggregate(); AnalysisEngineDescription createAggregateDescription();  }