BakeoutController-Basic  0.1
A Controller for the Omicron vacuum chamber
GetVoltage.java
1 package unit.devices.tdk_lambda_power_supply;
2 
4 import org.junit.Before;
5 import org.junit.Test;
6 
7 import java.io.IOException;
8 
9 import static org.junit.Assert.assertEquals;
10 
14 public final class GetVoltage extends TDKLambdaPowerSupplyTestCase {
15  private final Double voltage = 3.0;
16 
17  @Before
18  public void setUpCommunicator(){
19  this.communicatorForDevice.setInputStreamData(voltage.toString());
20  }
21 
22  @Test
23  public void getVoltageHappyPath() throws IOException {
24  Double voltage = this.powerSupply.getVoltage();
25  assertEquals(this.voltage, voltage);
26  }
27 }
void setInputStreamData(String dataForDeviceToRead)
Git Repo