Upload project.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package observer_pattern_tests.submersible.equipment;
|
||||
|
||||
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.PhotoSensor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class PhotoSensorTest {
|
||||
|
||||
public PhotoSensorTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class PhotoSensor.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
PhotoSensor s = new PhotoSensor(new ROV());
|
||||
String before = s.toString();
|
||||
s.update("photosensor");
|
||||
String after = s.toString();
|
||||
assertThat(after, is(not(equalTo(before))));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package observer_pattern_tests.submersible.equipment.materialsampler;
|
||||
|
||||
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.materialsampler.ChemicalScanner;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class ChemicalScannerTest {
|
||||
|
||||
public ChemicalScannerTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class ChemicalScanner.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
ChemicalScanner s = new ChemicalScanner(new ROV(), 1);
|
||||
String before = s.toString();
|
||||
s.update("scan");
|
||||
String after = s.toString();
|
||||
assertThat(after, is(not(equalTo(before))));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package observer_pattern_tests.submersible.equipment.materialsampler;
|
||||
|
||||
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.materialsampler.HotFluidSampler;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class HotFluidSamplerTest {
|
||||
|
||||
public HotFluidSamplerTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class HotFluidSampler.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
HotFluidSampler s = new HotFluidSampler(new ROV(),1);
|
||||
String before = s.toString();
|
||||
s.update("fluid");
|
||||
String after = s.toString();
|
||||
assertThat(after, is(not(equalTo(before))));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package observer_pattern_tests.submersible.equipment.materialsampler;
|
||||
|
||||
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.materialsampler.RockCoringDrill;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class RockCoringDrillTest {
|
||||
|
||||
public RockCoringDrillTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class RockCoringDrill.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
RockCoringDrill s = new RockCoringDrill(new ROV(),1);
|
||||
String before = s.toString();
|
||||
s.update("drill");
|
||||
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.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))));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package observer_pattern_tests.submersible.equipment.waterreadings;
|
||||
|
||||
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.waterreadings.IndexOfRefraction;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class IndexOfRefractionTest {
|
||||
|
||||
public IndexOfRefractionTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class IndexOfRefraction.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
IndexOfRefraction s = new IndexOfRefraction(new ROV(),1);
|
||||
String before = s.toString();
|
||||
s.update("refraction");
|
||||
String after = s.toString();
|
||||
assertThat(after, is(not(equalTo(before))));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package observer_pattern_tests.submersible.equipment.waterreadings;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
import org.junit.Test;
|
||||
import seabedexplorer.submersible.ROV;
|
||||
import seabedexplorer.submersible.equipment.waterreadings.PH;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class PHTest {
|
||||
|
||||
public PHTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class PH.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
PH s = new PH(new ROV());
|
||||
String before = s.toString();
|
||||
s.update("PH");
|
||||
String after = s.toString();
|
||||
assertThat(after, is(not(equalTo(before))));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package observer_pattern_tests.submersible.equipment.waterreadings;
|
||||
|
||||
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.waterreadings.Salinity;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Dylan Currey
|
||||
*/
|
||||
public class SalinityTest {
|
||||
|
||||
public SalinityTest() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test of update method, of class Salinity.
|
||||
*/
|
||||
@Test
|
||||
public void testUpdate() {
|
||||
System.out.println("update");
|
||||
Salinity s = new Salinity(new ROV());
|
||||
String before = s.toString();
|
||||
s.update("salinity");
|
||||
String after = s.toString();
|
||||
assertThat(after, is(not(equalTo(before))));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user