AzureMethodSource Interface

Implements

public interface AzureMethodSource
implements Annotation

This annotation provides test methods the ability to create a parameterized test using the permutation of

HttpClient X ServiceVersions X Arguments supplied by the parameterized testing values

This annotation should act similar to ParameterizedTest.

Method Summary

Modifier and Type Method and Description
abstract String maximumServiceVersion()

The maximum service version that the test can be ran against.

abstract String minimumServiceVersion()

The minimum service version that the test can be ran against.

abstract Class<> serviceVersionType()

The class that represents the service version type.

abstract String sourceSupplier()

Name of the method, either fully-qualified with package and class information or relative to the test method, which provides parameterized testing values.

abstract boolean useHttpClientPermutation()

A flag indicating if the test method should use HttpClient when creating test permutations.

Method Details

maximumServiceVersion

public abstract String maximumServiceVersion()

The maximum service version that the test can be ran against.

If neither this or minimumServiceVersion() are set the test will run against all service versions. If only this is set then the test will run against all service versions less than or equal to the maximum. If both this and minimumServiceVersion() are set then the inclusive range of service versions will be used to test.

If no service versions meet the requirements of this and minimumServiceVersion() the test will fail.

ServiceVersions are compared using their enum ordinal.

Returns:

The maximum service version that the test can be ran against.

minimumServiceVersion

public abstract String minimumServiceVersion()

The minimum service version that the test can be ran against.

If neither this or maximumServiceVersion() are set the test will run against all service versions. If only this is set then the test will run against all service versions equal to or later than the minimum. If both this and maximumServiceVersion() are set then the inclusive range of service versions will be used to test.

If no service versions meet the requirements of this and maximumServiceVersion() the test will fail.

ServiceVersions are compared using their enum ordinal.

Returns:

The minimum service version that the test can be ran against.

serviceVersionType

public abstract Class serviceVersionType()

The class that represents the service version type.

This is used to convert the minimumServiceVersion() into its ServiceVersion type.

Returns:

The class that represents the minimum service version the test can be ran against.

sourceSupplier

public abstract String sourceSupplier()

Name of the method, either fully-qualified with package and class information or relative to the test method, which provides parameterized testing values.

The source supplier method must be static and have a return type of Stream. If either of these don't hold true an IllegalArgumentException will be thrown during runtime.

By default no additional parameterized testing values are expected.

Returns:

The name of the method, either fully-qualified or relative, which provides parameterized testing values.

useHttpClientPermutation

public abstract boolean useHttpClientPermutation()

A flag indicating if the test method should use HttpClient when creating test permutations.

When TestMode is PLAYBACK this value is ignored as playback uses a specialized HttpClient that doesn't make network calls.

By default HttpClient are used in testing permutations.

Returns:

A flag indication if HttpClient are used when creating test permutations.

Applies to