Skip to content

Commit

Permalink
Fixes for eclipse and checkstyle warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenmeijer committed Jun 17, 2016
1 parent f380ef6 commit f126bd1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/java/nl/tudelft/contextproject/camera/Camera.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public void panTilt(int panOffset, int tiltOffset) {
setChanged();
notifyObservers();
}

/**
* Zooms the camera a certain offset. Cannot zoom past
* the zoom limits.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.io.IOException;
import java.util.Observable;
import javax.imageio.ImageIO;

/**
* Class to represent a mocked camera. It mimics or mocks the behavior of a specific camera
* without having a real connection to the cameras.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import nl.tudelft.contextproject.ContextTFP;
import nl.tudelft.contextproject.camera.Camera;
import nl.tudelft.contextproject.camera.LiveCameraConnection;
import nl.tudelft.contextproject.presets.InstantPreset;
import nl.tudelft.contextproject.presets.Preset;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* PowerMock(ito) brings a lot of static imports, but they do not decrease
* the readability of the code. The duplicate literals warning is of no
* interest to this class.
*
* @since 0.4, modified heavily for 0.7
*/
@RunWith(PowerMockRunner.class)
Expand Down Expand Up @@ -313,6 +314,7 @@ public void testSetAutoFocus() throws Exception {
/**
* Tests update method:
* All camera settings have been changed.
*
* <p>Uses @SuppressWarnings to suppress the PMD warning, because this
* test uses Mockito's verify method.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,23 @@ public void init() {
cam1 = new Camera();
cam0.setConnection(new MockedCameraConnection());
cam1.setConnection(new MockedCameraConnection());

pres = new InstantPreset(new CameraSettings(1, 1, 1, 2), 1);
pres2 = new InstantPreset(new CameraSettings(1, 3, 2, 5), 2);
pres3 = new InstantPreset(new CameraSettings(2, 4, 5, 3), 3);

shot1 = new Shot(1, cam0, pres);
shot2 = new Shot(2, cam1, pres2);
shot3 = new Shot(3, cam0, pres3);
dummyShot = new Shot(-1, "-1", Camera.DUMMY, new InstantPreset(new CameraSettings(), -1), "No shot", "No action");
dummyShot = new Shot(-1, "-1", Camera.DUMMY,
new InstantPreset(new CameraSettings(), -1), "No shot", "No action");

los = new ArrayList<>();
los1 = new ArrayList<>();
los.add(shot1);
los.add(shot2);
los.add(shot3);

script1 = new Script(los);
script2 = new Script(los1);
timeline1 = new Timeline(cam0, los1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public void testGetNextShot() {
assertEquals(timeline1.getNextShot(shot1), shot2);
assertNull(timeline.getNextShot(shot1));
}

/**
* Test the executeScript method.
* Checks if the shots in a script are properly applied
Expand Down

0 comments on commit f126bd1

Please sign in to comment.