We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abb0e17 commit 623f6beCopy full SHA for 623f6be
src/test/java/bwapi/PlayerTest.java
@@ -0,0 +1,21 @@
1
+package bwapi;
2
+
3
+import org.junit.Test;
4
5
+import static org.junit.Assert.assertFalse;
6
+import static org.mockito.Mockito.mock;
7
+import static org.mockito.Mockito.when;
8
9
+public class PlayerTest {
10
11
+ @Test
12
+ public void neutralIsNotEnemy() {
13
+ Player neutral = mock(Player.class);
14
+ Player self = mock(Player.class);
15
16
+ when(neutral.isNeutral()).thenReturn(true);
17
+ when(self.isEnemy(neutral)).thenCallRealMethod();
18
19
+ assertFalse(self.isEnemy(neutral));
20
+ }
21
+}
0 commit comments