1 package unit.kernel.models.pvci_pressure_gauge_factory;
5 import org.jmock.Expectations;
6 import org.junit.Before;
9 import static org.junit.Assert.assertNotNull;
20 public void setContext(){
21 context.checking(
new ExpectationsForTest());
25 public void getPressureGauge()
throws Exception{
29 private class ExpectationsForTest
extends Expectations {
30 public ExpectationsForTest(){
32 oneOf(mockKernel).getDeviceRegistryView();
33 will(returnValue(mockRegistry));
35 oneOf(mockRegistry).hasPressureGauge();
36 will(returnValue(Boolean.TRUE));
38 oneOf(mockRegistry).getPressureGauge();
39 will(returnValue(mockPressureGauge));
PressureGauge getPressureGauge()