Package net.shibboleth.idp.attribute.resolver.testing

# Class ResolverTestSupport

java.lang.Object
net.shibboleth.idp.attribute.resolver.testing.ResolverTestSupport

public class ResolverTestSupport extends Object
Support class for attribute resolvers testing.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`EPA_ATTRIB_ID`
eduPersonAfiliation.
`static final String[]`
`EPA1_VALUES`
Two affiliations.
`static final String[]`
`EPA2_VALUES`
Another two affiliations.
`static final String[]`
`EPA3_VALUES`
Three affiliations.
`static final String`
`EPE_ATTRIB_ID`
eduPersonEntitlement.
`static final String[]`
`EPE1_VALUES`
Two entitlement URIs.
`static final String[]`
`EPE2_VALUES`
An entitlement URN.
`static final String[]`
`EPE3_VALUES`
A different entitlement URN.

## Constructor Summary

Constructors
Constructor
Description
`ResolverTestSupport()`

## Method Summary

Modifier and Type
Method
Description
`static IdPAttribute`
`buildAttribute(String attributeId, String... values)`
Construct a test `IdPAttribute`
`static MockStaticAttributeDefinition`
`buildAttributeDefinition(String attributeId, String... values)`
Construct a test `AttributeDefinition`
`static MockStaticDataConnector`
`buildDataConnector(String connectorId, IdPAttribute... attributes)`
Construct a test `DataConnector`
`static AttributeResolutionContext`
`buildResolutionContext(ResolverPlugin<?>... plugins)`
work method to build a `AttributeResolutionContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### EPA_ATTRIB_ID

@Nonnull @NotEmpty public static final String EPA_ATTRIB_ID
eduPersonAfiliation.

See Also:
  - Constant Field Values

### EPA1_VALUES

@Nonnull @NotEmpty public static final String[] EPA1_VALUES
Two affiliations.

### EPA2_VALUES

@Nonnull @NotEmpty public static final String[] EPA2_VALUES
Another two affiliations.

### EPA3_VALUES

@Nonnull @NotEmpty public static final String[] EPA3_VALUES
Three affiliations.

### EPE_ATTRIB_ID

@Nonnull @NotEmpty public static final String EPE_ATTRIB_ID
eduPersonEntitlement.

See Also:
  - Constant Field Values

### EPE1_VALUES

@Nonnull @NotEmpty public static final String[] EPE1_VALUES
Two entitlement URIs.

### EPE2_VALUES

@Nonnull @NotEmpty public static final String[] EPE2_VALUES
An entitlement URN.

### EPE3_VALUES

@Nonnull @NotEmpty public static final String[] EPE3_VALUES
A different entitlement URN.

## Constructor Details

### ResolverTestSupport

public ResolverTestSupport()

## Method Details

### buildResolutionContext

@Nonnull public static AttributeResolutionContext buildResolutionContext(ResolverPlugin<?>... plugins)
work method to build a `AttributeResolutionContext`

Parameters:
  `plugins` - what to pupulate
Returns:
  the context

### buildAttribute

@Nonnull public static IdPAttribute buildAttribute(@Nonnull @NotEmpty String attributeId, String... values)
Construct a test `IdPAttribute`

Parameters:
  `attributeId` - its name
  `values` - its values (as strings)
Returns:
  the Attribute

### buildAttributeDefinition

@Nullable public static MockStaticAttributeDefinition buildAttributeDefinition(@Nonnull @NotEmpty String attributeId, @Nonnull String... values)
Construct a test `AttributeDefinition`

Parameters:
  `attributeId` - the name
  `values` - the values
Returns:
  the definition

### buildDataConnector

@Nullable public static MockStaticDataConnector buildDataConnector(@Nonnull @NotEmpty String connectorId, @Nonnull IdPAttribute... attributes)
Construct a test `DataConnector`

Parameters:
  `connectorId` - the name
  `attributes` - what to return
Returns:
  the definition