Class RangeInputTester
-
- All Implemented Interfaces:
public class RangeInputTester extends ComponentTester<T>
-
-
Constructor Summary
Constructors Constructor Description RangeInputTester(RangeInput component)Wrap given component for testing.
-
Method Summary
Modifier and Type Method Description DoublegetValue()Get the current value of the component. voidsetValue(Double value)Set the value to the component if it is usable. voidincrease()Increase the value by the amount defined by component step. voidincrease(int times)Increases the value by a specified multiple of the component step setting. voiddecrease()Decreases the value by the amount defined by component step. voiddecrease(int times)Decreases the value by a specified multiple of the component step setting. -
-
Method Detail
-
setValue
void setValue(Double value)
Set the value to the component if it is usable.
For a non interactable component an IllegalStateException will be thrown as the end user would not be able to set a value.
The value must be in the component min - max range, and should be valid according to the step scale factor, otherwise an IllegalArgumentException is thrown.- Parameters:
value- value to set
-
increase
void increase()
Increase the value by the amount defined by component step.
If the step is not defined, an IllegalStateException is thrown. An IllegalArgumentException is thrown if increase operation exceeds the max boundaries.
-
increase
void increase(int times)
Increases the value by a specified multiple of the component step setting.
If the step is not defined, an IllegalStateException is thrown. An IllegalArgumentException is thrown if increase operation exceeds the max boundaries.- Parameters:
times- The number of times the component step value should be multiplied before adding to the component value.
-
decrease
void decrease()
Decreases the value by the amount defined by component step.
If the step is not defined, an IllegalStateException is thrown. An IllegalArgumentException is thrown if increase operation exceeds the min boundaries.
-
decrease
void decrease(int times)
Decreases the value by a specified multiple of the component step setting.
If the step is not defined, an IllegalStateException is thrown. An IllegalArgumentException is thrown if increase operation exceeds the min boundaries.- Parameters:
times- The number of times the component step value should be multiplied before subtracting from the component value.
-
-
-
-