BakeoutController-Basic
0.1
A Controller for the Omicron vacuum chamber
Main Page
Related Pages
Packages
Classes
Files
File List
src
test
java
unit
devices
tdk_lambda_power_supply
SetCurrent.java
1
package
unit.devices.tdk_lambda_power_supply;
2
3
import
devices
.
PowerSupply
;
4
import
exceptions
.
ResponseNotOKException
;
5
import
org.junit.Test;
6
7
import
java.io.IOException;
8
13
public
final
class
SetCurrent
extends
TDKLambdaPowerSupplyTestCase
{
14
private
final
Double currentToSet = 3.0;
15
16
@Test
17
public
void
testSetCurrent()
throws
IOException {
18
this.powerSupply.
setCurrent
(currentToSet);
19
assertCorrectMessage(
20
String.format(
PowerSupply
.
SET_CURRENT_COMMAND
, currentToSet)
21
);
22
}
23
24
@Test(expected =
ResponseNotOKException
.class)
25
public
void
testResponseNotOK()
throws
IOException {
26
this.communicatorForDevice.
setInputStreamData
(errorMessage);
27
this.powerSupply.
setCurrent
(currentToSet);
28
}
29
}
unit.devices.tdk_lambda_power_supply.SetCurrent
Definition:
SetCurrent.java:13
devices.PowerSupply
Definition:
PowerSupply.java:8
exceptions
Definition:
DeviceAlreadyCreatedException.java:1
unit.devices.DeviceCommunicator.setInputStreamData
void setInputStreamData(String dataForDeviceToRead)
devices.PowerSupply.SET_CURRENT_COMMAND
String SET_CURRENT_COMMAND
Definition:
PowerSupply.java:40
unit.devices.tdk_lambda_power_supply.TDKLambdaPowerSupplyTestCase
Definition:
TDKLambdaPowerSupplyTestCase.java:16
devices
Definition:
AbstractRS232Device.java:1
exceptions.ResponseNotOKException
Definition:
ResponseNotOKException.java:9
devices.PowerSupply.setCurrent
void setCurrent(double newCurrent)
Git Repo