Search in sources :

Example 1 with ImmutableAuthoritativeRatingVantagePoint

use of com.khartec.waltz.model.authoritativesource.ImmutableAuthoritativeRatingVantagePoint in project waltz by khartec.

the class AuthoritativeSourceResolverTest method getBestRankedIsCorrect.

@Test
public void getBestRankedIsCorrect() {
    ImmutableAuthoritativeRatingVantagePoint rank1 = ImmutableAuthoritativeRatingVantagePoint.builder().vantagePoint(vantagePoint).rank(1).dataTypeCode("REF_DATA").applicationId(205L).rating(AuthoritativenessRating.PRIMARY).build();
    ImmutableAuthoritativeRatingVantagePoint rank2 = rank1.withRank(2);
    Optional<AuthoritativeRatingVantagePoint> bestRanked = AuthoritativeSourceResolver.getBestRanked(ListUtilities.newArrayList(rank1, rank2));
    Assert.assertTrue(bestRanked.isPresent());
    Assert.assertEquals(rank2, bestRanked.get());
}
Also used : ImmutableAuthoritativeRatingVantagePoint(com.khartec.waltz.model.authoritativesource.ImmutableAuthoritativeRatingVantagePoint) ImmutableAuthoritativeRatingVantagePoint(com.khartec.waltz.model.authoritativesource.ImmutableAuthoritativeRatingVantagePoint) AuthoritativeRatingVantagePoint(com.khartec.waltz.model.authoritativesource.AuthoritativeRatingVantagePoint) Test(org.junit.Test)

Aggregations

AuthoritativeRatingVantagePoint (com.khartec.waltz.model.authoritativesource.AuthoritativeRatingVantagePoint)1 ImmutableAuthoritativeRatingVantagePoint (com.khartec.waltz.model.authoritativesource.ImmutableAuthoritativeRatingVantagePoint)1 Test (org.junit.Test)1