@Test public void approveNull(){ ToBeValidatedFilter filter = new ToBeValidatedFilter(true); assertFalse(filter.filter(null)); filter = new ToBeValidatedFilter(false); assertFalse(filter.filter(null)); }
@Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbLicense){ if(toBeValidated){ return ((DbLicense)datamodelObj).isApproved() == null; } else{ return ((DbLicense)datamodelObj).isApproved() != null; } } return false; }
ToBeValidatedFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbLicense){ if(toBeValidated){ return ((DbLicense)datamodelObj).isApproved() == null; } else{ return ((DbLicense)datamodelObj).isApproved() != null; } } return false; } }
ToBeValidatedFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbLicense){ if(toBeValidated){ return ((DbLicense)datamodelObj).isApproved() == null; } else{ return ((DbLicense)datamodelObj).isApproved() != null; } } return false; } ToBeValidatedFilter(final Boolean toBeValidated); }
ToBeValidatedFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbLicense){ if(toBeValidated){ return ((DbLicense)datamodelObj).isApproved() == null; } else{ return ((DbLicense)datamodelObj).isApproved() != null; } } return false; } ToBeValidatedFilter(final Boolean toBeValidated); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields(); }
ToBeValidatedFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbLicense){ if(toBeValidated){ return ((DbLicense)datamodelObj).isApproved() == null; } else{ return ((DbLicense)datamodelObj).isApproved() != null; } } return false; } ToBeValidatedFilter(final Boolean toBeValidated); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields();  }