Upload project.
This commit is contained in:
@@ -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))));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user