public void merge(Model model) { EndStateModel state = (EndStateModel) model; setParent(null); setAttributes(merge(getAttributes(), state.getAttributes())); setSecured((SecuredModel) merge(getSecured(), state.getSecured())); setOnEntryActions(merge(getOnEntryActions(), state.getOnEntryActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), state.getExceptionHandlers())); setView(merge(getView(), state.getView())); setCommit(merge(getCommit(), state.getCommit())); setOutputs(merge(getOutputs(), state.getOutputs(), false)); }
public void merge(Model model) { EndStateModel state = (EndStateModel) model; setParent(null); setAttributes(merge(getAttributes(), state.getAttributes())); setSecured((SecuredModel) merge(getSecured(), state.getSecured())); setOnEntryActions(merge(getOnEntryActions(), state.getOnEntryActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), state.getExceptionHandlers())); setView(merge(getView(), state.getView())); setCommit(merge(getCommit(), state.getCommit())); setOutputs(merge(getOutputs(), state.getOutputs(), false)); }
public void merge(Model model) { EndStateModel state = (EndStateModel) model; setParent(null); setAttributes(merge(getAttributes(), state.getAttributes())); setSecured((SecuredModel) merge(getSecured(), state.getSecured())); setOnEntryActions(merge(getOnEntryActions(), state.getOnEntryActions(), false)); setExceptionHandlers(merge(getExceptionHandlers(), state.getExceptionHandlers())); setView(merge(getView(), state.getView())); setCommit(merge(getCommit(), state.getCommit())); setOutputs(merge(getOutputs(), state.getOutputs(), false)); }
public void testMerge() { EndStateModel child = new EndStateModel("child"); EndStateModel parent = new EndStateModel("child"); parent.setCommit("true"); parent.setView("view"); LinkedList<OutputModel> outputs = new LinkedList<>(); outputs.add(new OutputModel("foo", "bar")); parent.setOutputs(outputs); child.merge(parent); assertEquals("true", child.getCommit()); assertEquals("bar", child.getOutputs().get(0).getValue()); } }