@Test public void test_configuresStateAttribute() { final JsonRootNode node = buildJSON(); final SelectionEvent event = selectionEventFactory.newSelectionEvent(node); assertEquals(node.getBooleanValue("state"), event.getState()); }
public SelectionEvent newSelectionEvent(JsonNode node) { final Record record = recordFactory.newRecord(node.getNode("record")); final boolean state = node.getBooleanValue("state"); final ListGridRecord[] selection = listGridRecordFactory.newListGridRecords(node.getArrayNode("selection")); final ListGridRecord selectedRecord = listGridRecordFactory.newListGridRecord(node.getNode("selectedRecord")); return new SelectionEvent(record, state, selection, selectedRecord); }
SelectionEventFactory { public SelectionEvent newSelectionEvent(JsonNode node) { final Record record = recordFactory.newRecord(node.getNode("record")); final boolean state = node.getBooleanValue("state"); final ListGridRecord[] selection = listGridRecordFactory.newListGridRecords(node.getArrayNode("selection")); final ListGridRecord selectedRecord = listGridRecordFactory.newListGridRecord(node.getNode("selectedRecord")); return new SelectionEvent(record, state, selection, selectedRecord); } }
SelectionEventFactory { public SelectionEvent newSelectionEvent(JsonNode node) { final Record record = recordFactory.newRecord(node.getNode("record")); final boolean state = node.getBooleanValue("state"); final ListGridRecord[] selection = listGridRecordFactory.newListGridRecords(node.getArrayNode("selection")); final ListGridRecord selectedRecord = listGridRecordFactory.newListGridRecord(node.getNode("selectedRecord")); return new SelectionEvent(record, state, selection, selectedRecord); } @Inject  SelectionEventFactory(RecordFactory recordFactory, ListGridRecordFactory listGridRecordFactory); }
SelectionEventFactory { public SelectionEvent newSelectionEvent(JsonNode node) { final Record record = recordFactory.newRecord(node.getNode("record")); final boolean state = node.getBooleanValue("state"); final ListGridRecord[] selection = listGridRecordFactory.newListGridRecords(node.getArrayNode("selection")); final ListGridRecord selectedRecord = listGridRecordFactory.newListGridRecord(node.getNode("selectedRecord")); return new SelectionEvent(record, state, selection, selectedRecord); } @Inject  SelectionEventFactory(RecordFactory recordFactory, ListGridRecordFactory listGridRecordFactory); SelectionEvent newSelectionEvent(JsonNode node); }
SelectionEventFactory { public SelectionEvent newSelectionEvent(JsonNode node) { final Record record = recordFactory.newRecord(node.getNode("record")); final boolean state = node.getBooleanValue("state"); final ListGridRecord[] selection = listGridRecordFactory.newListGridRecords(node.getArrayNode("selection")); final ListGridRecord selectedRecord = listGridRecordFactory.newListGridRecord(node.getNode("selectedRecord")); return new SelectionEvent(record, state, selection, selectedRecord); } @Inject  SelectionEventFactory(RecordFactory recordFactory, ListGridRecordFactory listGridRecordFactory); SelectionEvent newSelectionEvent(JsonNode node);  }