All Downloads are FREE. Search and download functionalities are using the official Maven repository.

autofixture.publicinterface.inline.PortNumberGenerator Maven / Gradle / Ivy

package autofixture.publicinterface.inline;

import autofixture.interfaces.FixtureContract;
import autofixture.interfaces.InlineInstanceGenerator;

import java.util.Random;

public class PortNumberGenerator implements InlineInstanceGenerator {
  public static final int MAXIMUM_PORT_NUMBER = 65535;
  private final Random random = new Random();

  @Override
  public Integer next(final FixtureContract fixture) {
    return random.nextInt(MAXIMUM_PORT_NUMBER);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy