Upload project.
This commit is contained in:
@@ -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