Skip to content

Commit

Permalink
fix eventProvider NPE in TimerTest
Browse files Browse the repository at this point in the history
  • Loading branch information
fhnaumann committed Oct 15, 2024
1 parent 2fdc7ed commit da46695
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import wand555.github.io.challenges.criteria.goals.itemgoal.ItemGoal;
import wand555.github.io.challenges.criteria.goals.mobgoal.MobGoal;
import wand555.github.io.challenges.generated.GoalTimer;
import wand555.github.io.challenges.live.EventProvider;
import wand555.github.io.challenges.live.LiveService;
import wand555.github.io.challenges.offline_temp.OfflineTempData;
import wand555.github.io.challenges.teams.Team;

Expand All @@ -39,7 +41,9 @@ public void setUp() {
ResourceBundleContext resourceBundleContext = mock(ResourceBundleContext.class);
when(resourceBundleContext.miscResourceBundle()).thenReturn(CriteriaUtil.loadMiscResourceBundle());
when(context.resourceBundleContext()).thenReturn(resourceBundleContext);

LiveService liveService = mock(LiveService.class);
when(liveService.eventProvider()).thenReturn(mock(EventProvider.class));
when(context.liveService()).thenReturn(liveService);
server = MockBukkit.getOrCreateMock();
plugin = MockBukkit.load(Challenges.class);
when(context.plugin()).thenReturn(plugin);
Expand Down

0 comments on commit da46695

Please sign in to comment.