use of org.apache.archiva.configuration.model.functors.ProxyConnectorConfigurationOrderComparator in project archiva by apache.
the class ProxyConnectorConfigurationOrderComparatorTest method testSortNormal.
@Test
public void testSortNormal() {
List<ProxyConnectorConfiguration> proxies = new ArrayList<>();
proxies.add(createConnector("corporate", 3));
proxies.add(createConnector("snapshots", 1));
proxies.add(createConnector("3rdparty", 2));
proxies.add(createConnector("sandbox", 4));
Collections.sort(proxies, new ProxyConnectorConfigurationOrderComparator());
assertProxyOrder(new String[] { "snapshots", "3rdparty", "corporate", "sandbox" }, proxies);
}
use of org.apache.archiva.configuration.model.functors.ProxyConnectorConfigurationOrderComparator in project archiva by apache.
the class ProxyConnectorConfigurationOrderComparatorTest method testSortPartial.
@Test
public void testSortPartial() {
List<ProxyConnectorConfiguration> proxies = new ArrayList<>();
proxies.add(createConnector("corporate", 3));
proxies.add(createConnector("snapshots", 0));
proxies.add(createConnector("3rdparty", 2));
proxies.add(createConnector("sandbox", 0));
Collections.sort(proxies, new ProxyConnectorConfigurationOrderComparator());
assertProxyOrder(new String[] { "3rdparty", "corporate", "snapshots", "sandbox" }, proxies);
}
Aggregations