Skip to content

Commit

Permalink
Continue stubbing initial test
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jan 6, 2024
1 parent 56c4a95 commit bc81682
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
package net.xolt.freecam.util;

import net.minecraft.client.player.RemotePlayer;
import net.xolt.freecam.test.extension.BootstrapMinecraft;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

@BootstrapMinecraft
@ExtendWith(MockitoExtension.class)
class FreecamPositionTest {

@Mock RemotePlayer player;
private FreecamPosition position;

@BeforeEach
void setUp() {
position = new FreecamPosition(player);
}

@AfterEach
Expand All @@ -18,6 +28,10 @@ void tearDown() {

@Test
void setRotation() {
position.setRotation(10, 20);
Assertions.assertAll(
() -> Assertions.assertEquals(10, position.yaw),
() -> Assertions.assertEquals(20, position.pitch));
}

@Test
Expand Down

0 comments on commit bc81682

Please sign in to comment.