Upload project.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package observer_pattern_tests.submersible.equipment.topographicalmapper;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
import seabedexplorer.submersible.ROV;
|
||||
import seabedexplorer.submersible.equipment.topographicalmapper.Laser;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class LaserTest {
|
||||
|
||||
public LaserTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class Laser.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
Laser s = new Laser(new ROV(),1);
|
||||
String before = s.toString();
|
||||
s.update("laser");
|
||||
String after = s.toString();
|
||||
assertThat(after, is(not(equalTo(before))));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package observer_pattern_tests.submersible.equipment.topographicalmapper;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
import seabedexplorer.submersible.ROV;
|
||||
import seabedexplorer.submersible.equipment.topographicalmapper.Sonar;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class SonarTest {
|
||||
|
||||
public SonarTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class Sonar.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
Sonar s = new Sonar(new ROV());
|
||||
String before = s.toString();
|
||||
s.update("sonar");
|
||||
String after = s.toString();
|
||||
assertThat(after, is(not(equalTo(before))));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user