Class RangeInputTester

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final T component
    • Constructor Summary

      Constructors 
      Constructor Description
      RangeInputTester(RangeInput component) Wrap given component for testing.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Double getValue() Get the current value of the component.
      void setValue(Double value) Set the value to the component if it is usable.
      void increase() Increase the value by the amount defined by component step.
      void increase(int times) Increases the value by a specified multiple of the component step setting.
      void decrease() Decreases the value by the amount defined by component step.
      void decrease(int times) Decreases the value by a specified multiple of the component step setting.
      • Methods inherited from class com.vaadin.testbench.unit.ComponentTester

        find, getComponent, isUsable, setModal
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RangeInputTester

        RangeInputTester(RangeInput component)
        Wrap given component for testing.
        Parameters:
        component - target component
    • Method Detail

      • getValue

         Double getValue()

        Get the current value of the component.

        Returns:

        current component value

      • 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(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(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.