Search in sources :

Example 1 with DoubleProperty

use of org.apache.jmeter.testelement.property.DoubleProperty in project jmeter by apache.

the class TestNumberProperty method testCompareToMinMax.

@Test
public void testCompareToMinMax() {
    NumberProperty n1 = new DoubleProperty("n1", Double.MIN_VALUE);
    NumberProperty n2 = new DoubleProperty("n2", Double.MAX_VALUE);
    assertTrue(n1.compareTo(n2) < 0);
}
Also used : DoubleProperty(org.apache.jmeter.testelement.property.DoubleProperty) NumberProperty(org.apache.jmeter.testelement.property.NumberProperty) Test(org.junit.jupiter.api.Test)

Example 2 with DoubleProperty

use of org.apache.jmeter.testelement.property.DoubleProperty in project jmeter by apache.

the class TestNumberProperty method testDZeroCompareToDZero.

@Test
public void testDZeroCompareToDZero() {
    NumberProperty n1 = new DoubleProperty("n1", 0.0);
    NumberProperty n2 = new DoubleProperty("n2", 0.0);
    assertEquals(0, n1.compareTo(n2));
}
Also used : DoubleProperty(org.apache.jmeter.testelement.property.DoubleProperty) NumberProperty(org.apache.jmeter.testelement.property.NumberProperty) Test(org.junit.jupiter.api.Test)

Example 3 with DoubleProperty

use of org.apache.jmeter.testelement.property.DoubleProperty in project jmeter by apache.

the class TestNumberProperty method testIZeroCompareToDZero.

@Test
public void testIZeroCompareToDZero() {
    NumberProperty n1 = new IntegerProperty("n1", 0);
    NumberProperty n2 = new DoubleProperty("n2", 0.0);
    assertEquals(0, n1.compareTo(n2));
}
Also used : IntegerProperty(org.apache.jmeter.testelement.property.IntegerProperty) DoubleProperty(org.apache.jmeter.testelement.property.DoubleProperty) NumberProperty(org.apache.jmeter.testelement.property.NumberProperty) Test(org.junit.jupiter.api.Test)

Example 4 with DoubleProperty

use of org.apache.jmeter.testelement.property.DoubleProperty in project jmeter by apache.

the class TestNumberProperty method testCompareToNegative.

@Test
public void testCompareToNegative() {
    NumberProperty n1 = new DoubleProperty("n1", -1.0);
    NumberProperty n2 = new DoubleProperty("n2", 0.0);
    assertTrue(n1.compareTo(n2) < 0);
}
Also used : DoubleProperty(org.apache.jmeter.testelement.property.DoubleProperty) NumberProperty(org.apache.jmeter.testelement.property.NumberProperty) Test(org.junit.jupiter.api.Test)

Example 5 with DoubleProperty

use of org.apache.jmeter.testelement.property.DoubleProperty in project jmeter by apache.

the class TestNumberProperty method testCompareToPositive.

@Test
public void testCompareToPositive() {
    NumberProperty n1 = new DoubleProperty("n1", 1.0);
    NumberProperty n2 = new DoubleProperty("n2", 0.0);
    assertTrue(n1.compareTo(n2) > 0);
}
Also used : DoubleProperty(org.apache.jmeter.testelement.property.DoubleProperty) NumberProperty(org.apache.jmeter.testelement.property.NumberProperty) Test(org.junit.jupiter.api.Test)

Aggregations

DoubleProperty (org.apache.jmeter.testelement.property.DoubleProperty)5 NumberProperty (org.apache.jmeter.testelement.property.NumberProperty)5 Test (org.junit.jupiter.api.Test)5 IntegerProperty (org.apache.jmeter.testelement.property.IntegerProperty)1