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

org.junitpioneer.jupiter.params.FloatRangeSource Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
/*
 * Copyright 2015-2020 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v2.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v20.html
 */

package org.junitpioneer.jupiter.params;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.junit.jupiter.params.provider.ArgumentsSource;

/**
 * {@code @FloatRangeSource} is an {@link ArgumentsSource} that provides access to a range of {@code float} values.
 *
 * 

The supplied values will be provided as arguments to the annotated {@code @ParameterizedTest} method.

* *

For more details and examples, see * the documentation on Range Sources *

* * @since 0.5 * @see ArgumentsSource * @see org.junit.jupiter.params.ParameterizedTest */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @Documented @ArgumentsSource(RangeSourceArgumentsProvider.class) @RangeClass(FloatRange.class) public @interface FloatRangeSource { /** * The starting point of the range, inclusive. */ float from(); /** * The end point of the range, exclusive. */ float to(); /** * The size of the step between the {@code from} and the {@code to}. */ float step() default 1; /** * Whether the range is closed (inclusive of the {@link #to()}) or not. */ boolean closed() default false; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy