Search in sources :

Example 6 with AuthoritativeRatingVantagePoint

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

the class AuthoritativeSourceResolverTest method existingVantageAndDataTypeAndDifferentSourceThenDiscouraged.

@Test
public void existingVantageAndDataTypeAndDifferentSourceThenDiscouraged() {
    List<AuthoritativeRatingVantagePoint> vantagePoints = new ArrayList<>();
    vantagePoints.add(ImmutableAuthoritativeRatingVantagePoint.builder().vantagePoint(vantagePoint).rank(1).dataTypeCode("REF_DATA").applicationId(205L).rating(AuthoritativenessRating.PRIMARY).build());
    AuthoritativeSourceResolver authoritativeSourceResolver = new AuthoritativeSourceResolver(vantagePoints);
    AuthoritativenessRating rating = authoritativeSourceResolver.resolve(vantagePoint, sourceApp, "REF_DATA");
    Assert.assertEquals(AuthoritativenessRating.DISCOURAGED, rating);
}
Also used : ImmutableAuthoritativeRatingVantagePoint(com.khartec.waltz.model.authoritativesource.ImmutableAuthoritativeRatingVantagePoint) AuthoritativeRatingVantagePoint(com.khartec.waltz.model.authoritativesource.AuthoritativeRatingVantagePoint) ArrayList(java.util.ArrayList) AuthoritativenessRating(com.khartec.waltz.model.rating.AuthoritativenessRating) Test(org.junit.Test)

Aggregations

AuthoritativeRatingVantagePoint (com.khartec.waltz.model.authoritativesource.AuthoritativeRatingVantagePoint)6 ImmutableAuthoritativeRatingVantagePoint (com.khartec.waltz.model.authoritativesource.ImmutableAuthoritativeRatingVantagePoint)5 Test (org.junit.Test)5 AuthoritativenessRating (com.khartec.waltz.model.rating.AuthoritativenessRating)4 ArrayList (java.util.ArrayList)4 AuthoritativeSourceResolver (com.khartec.waltz.service.authoritative_source.AuthoritativeSourceResolver)1