@Test public void determineActions_shouldReturnCREATED() { List<String> actual = abstractSynchronizationService.determineActions( null, createPatientInstance(false)); Assert.assertTrue(actual.contains(SyncConstants.ACTION_CREATED)); }
protected List<String> determineActions(Object objToUpdate, Object baseObj) { List<String> result = new ArrayList<>(); if (baseObj instanceof BaseOpenmrsData && ((BaseOpenmrsData) baseObj).isVoided()) { result.add(ACTION_VOIDED); } if (objToUpdate == null) { result.add(0, ACTION_CREATED); } else { result.add(0, ACTION_UPDATED); } return result; }
AbstractSynchronizationService { protected List<String> determineActions(Object objToUpdate, Object baseObj) { List<String> result = new ArrayList<>(); if (baseObj instanceof BaseOpenmrsData && ((BaseOpenmrsData) baseObj).isVoided()) { result.add(ACTION_VOIDED); } if (objToUpdate == null) { result.add(0, ACTION_CREATED); } else { result.add(0, ACTION_UPDATED); } return result; } }
AbstractSynchronizationService { protected List<String> determineActions(Object objToUpdate, Object baseObj) { List<String> result = new ArrayList<>(); if (baseObj instanceof BaseOpenmrsData && ((BaseOpenmrsData) baseObj).isVoided()) { result.add(ACTION_VOIDED); } if (objToUpdate == null) { result.add(0, ACTION_CREATED); } else { result.add(0, ACTION_UPDATED); } return result; }  }
AbstractSynchronizationService { protected List<String> determineActions(Object objToUpdate, Object baseObj) { List<String> result = new ArrayList<>(); if (baseObj instanceof BaseOpenmrsData && ((BaseOpenmrsData) baseObj).isVoided()) { result.add(ACTION_VOIDED); } if (objToUpdate == null) { result.add(0, ACTION_CREATED); } else { result.add(0, ACTION_UPDATED); } return result; }   }
AbstractSynchronizationService { protected List<String> determineActions(Object objToUpdate, Object baseObj) { List<String> result = new ArrayList<>(); if (baseObj instanceof BaseOpenmrsData && ((BaseOpenmrsData) baseObj).isVoided()) { result.add(ACTION_VOIDED); } if (objToUpdate == null) { result.add(0, ACTION_CREATED); } else { result.add(0, ACTION_UPDATED); } return result; }    }