Skip to content

Commit

Permalink
Prevent errors in TryToCompleteTest
Browse files Browse the repository at this point in the history
Note - tests still fail.
  • Loading branch information
tastybento committed Sep 24, 2021
1 parent 7126acf commit 018455f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ public void setUp() throws Exception {
// User has all perms by default
when(user.hasPermission(anyString())).thenReturn(true);
when(user.getPlayer()).thenReturn(player);
UUID uniqueId = UUID.randomUUID();
when(user.getUniqueId()).thenReturn(uniqueId);
when(user.getTranslation(Mockito.anyString())).thenAnswer((Answer<String>) invocation -> invocation.getArgument(0, String.class));
when(user.getTranslationOrNothing(Mockito.anyString())).thenAnswer((Answer<String>) invocation -> invocation.getArgument(0, String.class));
when(user.getName()).thenReturn("tastybento");
@Nullable
Location userLoc = mock(Location.class);
Expand Down

0 comments on commit 018455f

Please sign in to comment.