Test Helper

Generate random values

License

License

GroupId

GroupId

org.rjung.util
ArtifactId

ArtifactId

test-helper
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

Test Helper
Generate random values
Project URL

Project URL

http://rynr.github.io/test-helper
Source Code Management

Source Code Management

http://github.com/rynr/test-helper

Download test-helper

How to add to project

<!-- https://jarcasting.com/artifacts/org.rjung.util/test-helper/ -->
<dependency>
    <groupId>org.rjung.util</groupId>
    <artifactId>test-helper</artifactId>
    <version>0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.rjung.util/test-helper/
implementation 'org.rjung.util:test-helper:0.0.3'
// https://jarcasting.com/artifacts/org.rjung.util/test-helper/
implementation ("org.rjung.util:test-helper:0.0.3")
'org.rjung.util:test-helper:jar:0.0.3'
<dependency org="org.rjung.util" name="test-helper" rev="0.0.3">
  <artifact name="test-helper" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.rjung.util', module='test-helper', version='0.0.3')
)
libraryDependencies += "org.rjung.util" % "test-helper" % "0.0.3"
[org.rjung.util/test-helper "0.0.3"]

Dependencies

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : hamcrest-library jar 1.3

Project Modules

There are no modules declared in this project.

test-helper

I like using random values for tests. So I wrote the methods for random values quite often. Now i started this library to not write it again and again.

example

@Test
public void testSomethingWithARandomValue() {
    int randomIntFullIntegerRange = RandomValues.randomInt();
    int randomPositiveIntWithMax = RandomValues.randomInt(15);
    ExampleEnum randomEnumValue = RandomValues.randomEnum(ExampleEnum.class);
    // ...
}

links

Versions

Version
0.0.3
0.0.2