Search in sources :

Example 1 with ValueMatcher

use of org.mule.tck.junit4.matcher.ValueMatcher in project mule by mulesoft.

the class SourcesValuesTestCase method multiLevelValue.

@Test
public void multiLevelValue() throws Exception {
    Set<Value> values = getValuesFromSource("source-with-multi-level-value", "values");
    ValueMatcher americaValue = valueWithId("America").withDisplayName("America").withPartName("continent").withChilds(valueWithId("Argentina").withDisplayName("Argentina").withPartName("country").withChilds(valueWithId("Buenos Aires").withDisplayName("Buenos Aires").withPartName("city")));
    assertThat(values, hasValues(americaValue));
}
Also used : ValueMatcher(org.mule.tck.junit4.matcher.ValueMatcher) Value(org.mule.runtime.api.value.Value) Test(org.junit.Test)

Example 2 with ValueMatcher

use of org.mule.tck.junit4.matcher.ValueMatcher in project mule by mulesoft.

the class OperationValuesTestCase method multiLevelOption.

@Test
public void multiLevelOption() throws Exception {
    Set<Value> values = getValues("multiLevelValue", "values");
    ValueMatcher americaValue = valueWithId("America").withDisplayName("America").withPartName("continent").withChilds(valueWithId("Argentina").withDisplayName("Argentina").withPartName("country").withChilds(valueWithId("Buenos Aires").withDisplayName("Buenos Aires").withPartName("city")));
    assertThat(values, hasValues(americaValue));
}
Also used : ValueMatcher(org.mule.tck.junit4.matcher.ValueMatcher) Value(org.mule.runtime.api.value.Value) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 Value (org.mule.runtime.api.value.Value)2 ValueMatcher (org.mule.tck.junit4.matcher.ValueMatcher)2