SW360ProjectAdapterUtils { public static boolean isValidProject(SW360Project project) { return StringUtils.isNotEmpty(project.getName()) && StringUtils.isNotEmpty(project.getVersion()); } private  SW360ProjectAdapterUtils(); static boolean isValidProject(SW360Project project); static boolean hasEqualCoordinates(SW360Project sw360Project, String projectName, String projectVersion);  }
@Test public void testIsValidProjectWithValidProject() { SW360Project project = new SW360Project() .setName(PROJECT_NAME) .setVersion(PROJECT_VERSION); boolean validComponent = SW360ProjectAdapterUtils.isValidProject(project); assertThat(validComponent).isTrue(); }
@Test public void testIsValidProjectWithNoVersion() { SW360Project project = new SW360Project(); project.setName(PROJECT_NAME); boolean validComponent = SW360ProjectAdapterUtils.isValidProject(project); assertThat(validComponent).isFalse(); }
@Test public void testIsValidProjectWithNoName() { SW360Project project = new SW360Project(); project.setVersion(PROJECT_VERSION); boolean validComponent = SW360ProjectAdapterUtils.isValidProject(project); assertThat(validComponent).isFalse(); }