@Test public void testGetPendingLicense() throws Exception { final DbLicense dbLicense = new DbLicense() ; dbLicense.setName("name"); dbLicense.setLongName("longName"); dbLicense.setComments("comments"); dbLicense.setRegexp("regexp"); dbLicense.setUrl("url"); final ModelMapper modelMapper = new ModelMapper(mock(RepositoryHandler.class)); final License license = modelMapper.getLicense(dbLicense); assertEquals(true, license.isPending()); }
public License getLicense(final DbLicense dbLicense) { final License license = DataModelFactory.createLicense(dbLicense.getName(), dbLicense.getLongName(), dbLicense.getComments(), dbLicense.getRegexp(), dbLicense.getUrl()); if (dbLicense.isApproved() != null) { license.setApproved(dbLicense.isApproved()); }else{ license.setPending(true); } if (license.getLongName().isEmpty() && license.getComments().isEmpty() && license.getUrl().isEmpty() && license.getRegexp().isEmpty()) { license.setUnknown(true); } return license; }
ModelMapper { public License getLicense(final DbLicense dbLicense) { final License license = DataModelFactory.createLicense(dbLicense.getName(), dbLicense.getLongName(), dbLicense.getComments(), dbLicense.getRegexp(), dbLicense.getUrl()); if (dbLicense.isApproved() != null) { license.setApproved(dbLicense.isApproved()); }else{ license.setPending(true); } if (license.getLongName().isEmpty() && license.getComments().isEmpty() && license.getUrl().isEmpty() && license.getRegexp().isEmpty()) { license.setUnknown(true); } return license; } }
ModelMapper { public License getLicense(final DbLicense dbLicense) { final License license = DataModelFactory.createLicense(dbLicense.getName(), dbLicense.getLongName(), dbLicense.getComments(), dbLicense.getRegexp(), dbLicense.getUrl()); if (dbLicense.isApproved() != null) { license.setApproved(dbLicense.isApproved()); }else{ license.setPending(true); } if (license.getLongName().isEmpty() && license.getComments().isEmpty() && license.getUrl().isEmpty() && license.getRegexp().isEmpty()) { license.setUnknown(true); } return license; } ModelMapper(final RepositoryHandler repoHandler); }
ModelMapper { public License getLicense(final DbLicense dbLicense) { final License license = DataModelFactory.createLicense(dbLicense.getName(), dbLicense.getLongName(), dbLicense.getComments(), dbLicense.getRegexp(), dbLicense.getUrl()); if (dbLicense.isApproved() != null) { license.setApproved(dbLicense.isApproved()); }else{ license.setPending(true); } if (license.getLongName().isEmpty() && license.getComments().isEmpty() && license.getUrl().isEmpty() && license.getRegexp().isEmpty()) { license.setUnknown(true); } return license; } ModelMapper(final RepositoryHandler repoHandler); DbOrganization getDbOrganization(final Organization organization); Organization getOrganization(final DbOrganization dbOrganization); DbLicense getDbLicense(final License license); License getLicense(final DbLicense dbLicense); DbArtifact getDbArtifact(final Artifact artifact); Artifact getArtifact(final DbArtifact dbArtifact); DbModule getDbModule(final Module module); Module getModule(final DbModule dbModule); Dependency getDependency(final DbDependency dbDependency, final String sourceName, final String sourceVersion); Comment getComment(final DbComment dbComment); DbComment getDbComment(final Comment comment); }
ModelMapper { public License getLicense(final DbLicense dbLicense) { final License license = DataModelFactory.createLicense(dbLicense.getName(), dbLicense.getLongName(), dbLicense.getComments(), dbLicense.getRegexp(), dbLicense.getUrl()); if (dbLicense.isApproved() != null) { license.setApproved(dbLicense.isApproved()); }else{ license.setPending(true); } if (license.getLongName().isEmpty() && license.getComments().isEmpty() && license.getUrl().isEmpty() && license.getRegexp().isEmpty()) { license.setUnknown(true); } return license; } ModelMapper(final RepositoryHandler repoHandler); DbOrganization getDbOrganization(final Organization organization); Organization getOrganization(final DbOrganization dbOrganization); DbLicense getDbLicense(final License license); License getLicense(final DbLicense dbLicense); DbArtifact getDbArtifact(final Artifact artifact); Artifact getArtifact(final DbArtifact dbArtifact); DbModule getDbModule(final Module module); Module getModule(final DbModule dbModule); Dependency getDependency(final DbDependency dbDependency, final String sourceName, final String sourceVersion); Comment getComment(final DbComment dbComment); DbComment getDbComment(final Comment comment);  }