Search in sources :

Example 11 with SemanticVersion

use of org.nzbhydra.mapping.SemanticVersion in project nzbhydra2 by theotherp.

the class UpdateManagerTest method shouldGetChangesSince.

@Test
public void shouldGetChangesSince() throws Exception {
    testee.latestVersion = new SemanticVersion(2, 0, 0);
    List<ChangelogVersionEntry> changesSince = testee.getChangesSinceCurrentVersion();
    assertEquals(1, changesSince.size());
    // Skip 1.0.0 because it's older and skip 3.0.0 because it's not yet released
    assertEquals("2.0.0", changesSince.get(0).getVersion());
}
Also used : ChangelogVersionEntry(org.nzbhydra.mapping.changelog.ChangelogVersionEntry) SemanticVersion(org.nzbhydra.mapping.SemanticVersion) Test(org.junit.Test)

Aggregations

SemanticVersion (org.nzbhydra.mapping.SemanticVersion)11 IOException (java.io.IOException)2 Test (org.junit.Test)2 ChangelogVersionEntry (org.nzbhydra.mapping.changelog.ChangelogVersionEntry)2 NewsEntry (org.nzbhydra.news.NewsProvider.NewsEntry)2 TypeReference (com.fasterxml.jackson.core.type.TypeReference)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 Instant (java.time.Instant)1 ChronoUnit (java.time.temporal.ChronoUnit)1 ArrayList (java.util.ArrayList)1 Comparator (java.util.Comparator)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 AllArgsConstructor (lombok.AllArgsConstructor)1 Data (lombok.Data)1 Release (org.nzbhydra.mapping.github.Release)1 WebAccess (org.nzbhydra.okhttp.WebAccess)1 UpdateManager (org.nzbhydra.update.UpdateManager)1 Logger (org.slf4j.Logger)1 LoggerFactory (org.slf4j.LoggerFactory)1