use of com.facebook.buck.rules.Label in project buck by facebook.
the class TypeCoercerTest method coerceToLabels.
@Test
public void coerceToLabels() throws NoSuchFieldException, CoerceFailedException {
Type type = TestFields.class.getField("labels").getGenericType();
TypeCoercer<?> coercer = typeCoercerFactory.typeCoercerForType(type);
ImmutableList<String> input = ImmutableList.of("cheese", "cake", "tastes", "good");
Object result = coercer.coerce(cellRoots, filesystem, Paths.get(""), input);
ImmutableSortedSet<Label> expected = ImmutableSortedSet.of(Label.of("cake"), Label.of("cheese"), Label.of("good"), Label.of("tastes"));
assertEquals(expected, result);
}