use of com.laytonsmith.abstraction.blocks.MCBlock in project CommandHelper by EngineHub.
the class PlayerManangementTest method testPcursor.
@Test(timeout = 10000)
public void testPcursor() throws Exception, Exception {
MCBlock b = mock(MCBlock.class);
CommandHelperPlugin.myServer = fakeServer;
when(fakeServer.getPlayer(fakePlayer.getName())).thenReturn(fakePlayer);
when(fakePlayer.getTargetBlock((HashSet) eq(null), anyInt())).thenReturn(b);
MCWorld w = mock(MCWorld.class);
MCLocation loc = StaticTest.GetFakeLocation(w, 0, 0, 0);
when(b.getLocation()).thenReturn(loc);
when(b.getWorld()).thenReturn(w);
Run("pcursor()", fakePlayer);
verify(fakePlayer, times(1)).getTargetBlock((HashSet) eq(null), anyInt());
}
Aggregations