@Test public void pipelineOverwriteTest() { List<Map<String, String>> listWithNonEmptyMap = new LinkedList<>(); HashMap<String, String> nonEmptyMap = new HashMap<>(); nonEmptyMap.put("var_out_test", "Lorem"); listWithNonEmptyMap.add(nonEmptyMap); SingleValueAssignExtension assign = new SingleValueAssignExtension(); Assign concreteAssignTag = new Assign(); concreteAssignTag.setName("var_out_test"); concreteAssignTag.setExpr("consectetur"); List<Map<String, String>> processedList = assign.pipelinePossibleStates(concreteAssignTag, listWithNonEmptyMap); Assert.assertEquals(1, processedList.size()); Map<String, String> resultMap = processedList.get(0); Assert.assertEquals(1, resultMap.keySet().size()); Assert.assertEquals("consectetur", resultMap.get("var_out_test")); }
public List<Map<String, String>> pipelinePossibleStates(Assign action, List<Map<String, String>> possibleStateList) { for (Map<String, String> possibleState : possibleStateList) { possibleState.put(action.getName(), action.getExpr()); } return possibleStateList; }
SingleValueAssignExtension implements CustomTagExtension<Assign> { public List<Map<String, String>> pipelinePossibleStates(Assign action, List<Map<String, String>> possibleStateList) { for (Map<String, String> possibleState : possibleStateList) { possibleState.put(action.getName(), action.getExpr()); } return possibleStateList; } }
SingleValueAssignExtension implements CustomTagExtension<Assign> { public List<Map<String, String>> pipelinePossibleStates(Assign action, List<Map<String, String>> possibleStateList) { for (Map<String, String> possibleState : possibleStateList) { possibleState.put(action.getName(), action.getExpr()); } return possibleStateList; }  }
SingleValueAssignExtension implements CustomTagExtension<Assign> { public List<Map<String, String>> pipelinePossibleStates(Assign action, List<Map<String, String>> possibleStateList) { for (Map<String, String> possibleState : possibleStateList) { possibleState.put(action.getName(), action.getExpr()); } return possibleStateList; }  Class<Assign> getTagActionClass(); String getTagName(); String getTagNameSpace(); List<Map<String, String>> pipelinePossibleStates(Assign action, List<Map<String, String>> possibleStateList); }
SingleValueAssignExtension implements CustomTagExtension<Assign> { public List<Map<String, String>> pipelinePossibleStates(Assign action, List<Map<String, String>> possibleStateList) { for (Map<String, String> possibleState : possibleStateList) { possibleState.put(action.getName(), action.getExpr()); } return possibleStateList; }  Class<Assign> getTagActionClass(); String getTagName(); String getTagNameSpace(); List<Map<String, String>> pipelinePossibleStates(Assign action, List<Map<String, String>> possibleStateList);  }