SW360ProjectAdapterUtils { public static boolean hasEqualCoordinates(SW360Project sw360Project, String projectName, String projectVersion) { boolean isAppIdEqual = sw360Project.getName().equalsIgnoreCase(projectName); boolean isProjectVersionEqual = sw360Project.getVersion().equalsIgnoreCase(projectVersion); return isAppIdEqual && isProjectVersionEqual; } private  SW360ProjectAdapterUtils(); static boolean isValidProject(SW360Project project); static boolean hasEqualCoordinates(SW360Project sw360Project, String projectName, String projectVersion);  }
@Test public void testHasEqualCoordinatesTrue() { SW360Project project = new SW360Project() .setName(PROJECT_NAME) .setVersion(PROJECT_VERSION); boolean hasEqualCoordinates = SW360ProjectAdapterUtils.hasEqualCoordinates(project, PROJECT_NAME, PROJECT_VERSION); assertThat(hasEqualCoordinates).isTrue(); }
@Test public void testHasEqualCoordinatesFalseByVersion() { SW360Project project = new SW360Project() .setName(PROJECT_NAME) .setVersion(PROJECT_VERSION); boolean hasEqualCoordinates = SW360ProjectAdapterUtils.hasEqualCoordinates(project, PROJECT_NAME, PROJECT_VERSION + "-no"); assertThat(hasEqualCoordinates).isFalse(); }
@Test public void testHasEqualCoordinatesFalseByName() { SW360Project project = new SW360Project() .setName(PROJECT_NAME) .setVersion(PROJECT_VERSION); boolean hasEqualCoordinates = SW360ProjectAdapterUtils.hasEqualCoordinates(project, PROJECT_NAME + "-no", PROJECT_VERSION); assertThat(hasEqualCoordinates).isFalse(); }