Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CATROID-1469 Test: testCloneValues failing #4608

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import static junit.framework.Assert.assertEquals;

import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
Expand Down Expand Up @@ -111,12 +112,14 @@ public void testSetRotation() {
public void testCloneValues() {
Sprite cloneSprite = mock(Sprite.class);
PhysicsObject clonePhysicsObject = mock(PhysicsObject.class);

when(physicsWorldSpy.getPhysicsObject(cloneSprite)).thenReturn(clonePhysicsObject);
PhysicsLook cloneLook = new PhysicsLook(cloneSprite, physicsWorldSpy);

PhysicsWorld.activeArea = new Vector2(0.0f, 0.0f);
when(clonePhysicsObject.getMassCenter()).thenReturn(new Vector2(0.0f, 0.0f));
when(clonePhysicsObject.getCircumference()).thenReturn(0.0f);
doNothing().when(clonePhysicsObject).setFixedRotation(false);

physicsLook.setBrightnessInUserInterfaceDimensionUnit(32);
physicsLook.copyTo(cloneLook);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public float getGravityScale() {
return body.getGravityScale();
}

void setFixedRotation(boolean flag) {
public void setFixedRotation(boolean flag) {
body.setFixedRotation(flag);
}

Expand Down