use of com.thinkbiganalytics.rest.model.LabelValue in project kylo by Teradata.
the class TestPreconditionPolicyTransform method testFeedExecutedSinceFeed.
@Test
public void testFeedExecutedSinceFeed() throws IOException {
String dependentUponFeed = "category.feed";
String currentFeed = "currentCategory.currentFeeda";
FeedExecutedSinceFeeds feedExecutedSinceFeed = new FeedExecutedSinceFeeds(currentFeed, dependentUponFeed);
PreconditionRule uiModel = PreconditionAnnotationTransformer.instance().toUIModel(feedExecutedSinceFeed);
List<LabelValue> values = new ArrayList<>();
values.add(new LabelValue("Label1", "Value1"));
values.add(new LabelValue("Label2", "Value2"));
uiModel.getProperty("Dependent Feeds").setValues(values);
FeedExecutedSinceFeeds convertedPolicy = fromUI(uiModel, FeedExecutedSinceFeeds.class);
Assert.assertEquals(currentFeed, convertedPolicy.getSinceCategoryAndFeedName());
Assert.assertEquals(dependentUponFeed, convertedPolicy.getCategoryAndFeeds());
Set<ObligationGroup> preconditionGroups = convertedPolicy.buildPreconditionObligations();
}
Aggregations