File tree 1 file changed +14
-0
lines changed
src/test/java/dev/rusthero/versionchecker/tasks
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -39,4 +39,18 @@ void runWhenUpToDate() throws MalformedURLException {
39
39
updateTracker .run ();
40
40
if (isOutdated .get () || isException .get ()) fail ();
41
41
}
42
+
43
+ @ Test
44
+ void runWithInvalidRepo () throws MalformedURLException {
45
+ GitHubVersionChecker versionChecker = new GitHubVersionChecker ("rusthero" , "this-repo-does-not-exist" );
46
+ Version version = new Version ("1.0.0" );
47
+
48
+ AtomicBoolean isOutdated = new AtomicBoolean (false );
49
+ AtomicBoolean isException = new AtomicBoolean (false );
50
+ UpdateTracker updateTracker = new UpdateTracker (versionChecker , version ,
51
+ latestVersion -> isOutdated .set (true ),
52
+ exception -> isException .set (true ));
53
+ updateTracker .run ();
54
+ if (isOutdated .get () || !isException .get ()) fail ();
55
+ }
42
56
}
You can’t perform that action at this time.
0 commit comments