Compare commits
No commits in common. "d07659280307bfb00272aaba1d1b6a9b8bc247ab" and "0159565bf13ad2405d59ad7fe8d051be258cee22" have entirely different histories.
d076592803
...
0159565bf1
2 changed files with 9 additions and 8 deletions
4
pom.xml
4
pom.xml
|
@ -2,7 +2,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>eu.m724</groupId>
|
<groupId>eu.m724</groupId>
|
||||||
<artifactId>jarupdater</artifactId>
|
<artifactId>jarupdater</artifactId>
|
||||||
<version>0.1.7</version>
|
<version>0.1.7-SNAPSHOT</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
@ -63,6 +63,6 @@
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<developerConnection>scm:git:git@git.m724.eu:Minecon724/jarupdater.git</developerConnection>
|
<developerConnection>scm:git:git@git.m724.eu:Minecon724/jarupdater.git</developerConnection>
|
||||||
<tag>jarupdater-0.1.7</tag>
|
<tag>HEAD</tag>
|
||||||
</scm>
|
</scm>
|
||||||
</project>
|
</project>
|
|
@ -1,14 +1,15 @@
|
||||||
package jarupdater;
|
package jarupdater;
|
||||||
|
|
||||||
import eu.m724.jarupdater.live.MetadataDAO;
|
|
||||||
import eu.m724.jarupdater.object.Version;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.nio.file.NoSuchFileException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.CompletionException;
|
import java.util.concurrent.CompletionException;
|
||||||
|
|
||||||
|
import eu.m724.jarupdater.live.MetadataDAO;
|
||||||
|
import eu.m724.jarupdater.object.Version;
|
||||||
|
|
||||||
public class MockMetadataDAO implements MetadataDAO {
|
public class MockMetadataDAO implements MetadataDAO {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -24,13 +25,13 @@ public class MockMetadataDAO implements MetadataDAO {
|
||||||
|
|
||||||
switch (versionLabel) {
|
switch (versionLabel) {
|
||||||
case "1.0":
|
case "1.0":
|
||||||
version = new Version(1, 100, "1.0", fileUrl, null, "dd3822ed965b2820aa0800f04b86f26d0b656fca3b97ddd264046076f81e3a24");
|
version = new Version(1, 100, "1.0", fileUrl, "dd3822ed965b2820aa0800f04b86f26d0b656fca3b97ddd264046076f81e3a24");
|
||||||
break;
|
break;
|
||||||
case "1.1":
|
case "1.1":
|
||||||
version = new Version(2, 200, "1.1", fileUrl, null,"4d59994f607b89987d5bff430a4229edbbb045b3da9eaf1c63fa8e5fb208d824");
|
version = new Version(2, 200, "1.1", fileUrl, "4d59994f607b89987d5bff430a4229edbbb045b3da9eaf1c63fa8e5fb208d824");
|
||||||
break;
|
break;
|
||||||
case "latest":
|
case "latest":
|
||||||
version = new Version(2, 200, "1.1", fileUrl, null, "4d59994f607b89987d5bff430a4229edbbb045b3da9eaf1c63fa8e5fb208d824");
|
version = new Version(2, 200, "1.1", fileUrl, "4d59994f607b89987d5bff430a4229edbbb045b3da9eaf1c63fa8e5fb208d824");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return CompletableFuture.failedFuture(new CompletionException(new IOException("no such version")));
|
return CompletableFuture.failedFuture(new CompletionException(new IOException("no such version")));
|
||||||
|
|
Loading…
Reference in a new issue