projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🔥 Remove fetching of custom edition from rescuer
[Sone.git]
/
src
/
test
/
java
/
net
/
pterodactylus
/
sone
/
core
/
SoneRescuerTest.java
diff --git
a/src/test/java/net/pterodactylus/sone/core/SoneRescuerTest.java
b/src/test/java/net/pterodactylus/sone/core/SoneRescuerTest.java
index
ff49a4c
..
92748e8
100644
(file)
--- a/
src/test/java/net/pterodactylus/sone/core/SoneRescuerTest.java
+++ b/
src/test/java/net/pterodactylus/sone/core/SoneRescuerTest.java
@@
-25,7
+25,6
@@
import org.mockito.stubbing.Answer;
public class SoneRescuerTest {
private static final long CURRENT_EDITION = 12L;
public class SoneRescuerTest {
private static final long CURRENT_EDITION = 12L;
- private static final long SOME_OTHER_EDITION = 15L;
private final Core core = mock(Core.class);
private final SoneDownloader soneDownloader = mock(SoneDownloader.class);
private final Sone sone = mock(Sone.class);
private final Core core = mock(Core.class);
private final SoneDownloader soneDownloader = mock(SoneDownloader.class);
private final Sone sone = mock(Sone.class);
@@
-71,12
+70,6
@@
public class SoneRescuerTest {
}
@Test
}
@Test
- public void currentEditionCanBeSet() {
- soneRescuer.setEdition(SOME_OTHER_EDITION);
- assertThat(soneRescuer.getCurrentEdition(), is(SOME_OTHER_EDITION));
- }
-
- @Test
public void lastFetchOfANewSoneRescuerWasSuccessful() {
assertThat(soneRescuer.isLastFetchSuccessful(), is(true));
}
public void lastFetchOfANewSoneRescuerWasSuccessful() {
assertThat(soneRescuer.isLastFetchSuccessful(), is(true));
}
@@
-126,7
+119,7
@@
public class SoneRescuerTest {
FreenetURI keyWithDocName = mock(FreenetURI.class);
FreenetURI keyWithMetaStrings = mock(FreenetURI.class);
when(keyWithDocName.setMetaString(eq(new String[] { "sone.xml" }))).thenReturn(keyWithMetaStrings);
FreenetURI keyWithDocName = mock(FreenetURI.class);
FreenetURI keyWithMetaStrings = mock(FreenetURI.class);
when(keyWithDocName.setMetaString(eq(new String[] { "sone.xml" }))).thenReturn(keyWithMetaStrings);
- when(sskKey.setDocName(eq("Sone-" +
CURRENT_EDITION
))).thenReturn(keyWithDocName);
+ when(sskKey.setDocName(eq("Sone-" +
(CURRENT_EDITION - 1)
))).thenReturn(keyWithDocName);
when(sone.getRequestUri().setKeyType(eq("SSK"))).thenReturn(sskKey);
return keyWithMetaStrings;
}
when(sone.getRequestUri().setKeyType(eq("SSK"))).thenReturn(sskKey);
return keyWithMetaStrings;
}