|
|
@ -9,18 +9,6 @@ import org.junit.Test; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class JFormSliderPaneTest { |
|
|
|
public class JFormSliderPaneTest { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testParseInputValue() { |
|
|
|
|
|
|
|
JFormSliderPane sliderPane = new JFormSliderPane(); |
|
|
|
|
|
|
|
int result = Reflect.on(sliderPane).call("parseInputValue", "100%").get(); |
|
|
|
|
|
|
|
Assert.assertEquals(100, result); |
|
|
|
|
|
|
|
result = Reflect.on(sliderPane).call("parseInputValue", "50%").get(); |
|
|
|
|
|
|
|
Assert.assertEquals(50, result); |
|
|
|
|
|
|
|
result = Reflect.on(sliderPane).call("parseInputValue", "50").get(); |
|
|
|
|
|
|
|
Assert.assertEquals(50, result); |
|
|
|
|
|
|
|
result = Reflect.on(sliderPane).call("parseInputValue", "50abc").get(); |
|
|
|
|
|
|
|
Assert.assertEquals(100, result); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testGetPreferredValue() { |
|
|
|
public void testGetPreferredValue() { |
|
|
|