Example usage for com.liferay.portal.kernel.test.util RandomTestUtil randomDouble

List of usage examples for com.liferay.portal.kernel.test.util RandomTestUtil randomDouble

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.test.util RandomTestUtil randomDouble.

Prototype

public static double randomDouble() 

Source Link

Usage

From source file:com.liferay.dynamic.data.mapping.expression.internal.DDMExpressionImplTest.java

License:Open Source License

@Test(expected = DDMExpressionException.IncompatipleReturnType.class)
public void testReturnTypeBooleanWithNumber() throws Exception {
    DDMExpressionImpl ddmExpression = new DDMExpressionImpl<>("true", Boolean.class);

    ddmExpression.toRetunType(RandomTestUtil.randomDouble());
}

From source file:com.liferay.ratings.verify.test.VerifyRatingsTest.java

License:Open Source License

protected double addVote() throws Exception {
    double score = RandomTestUtil.randomDouble();
    User user = UserTestUtil.addUser();/*from w  ww  .jav a  2s  . c o  m*/

    _users.add(user);

    RatingsTestUtil.addEntry(_CLASS_NAME, _CLASS_PK, score, user.getUserId());

    return score;
}