use of com.google.template.soy.types.SoyTypeRegistry in project closure-templates by google.
the class ResolveExpressionTypesVisitorTest method testProtoInitTyping.
@Test
public void testProtoInitTyping() {
SoyTypeRegistry typeRegistry = new SoyTypeRegistry.Builder().addDescriptors(ImmutableList.of(ExampleExtendable.getDescriptor())).build();
SoyFileSetNode soyTree = SoyFileSetParserBuilder.forFileContents(constructTemplateSource("{let $proto: example.ExampleExtendable() /}", "{assertType('example.ExampleExtendable', $proto)}")).addSoyFunction(ASSERT_TYPE_FUNCTION).typeRegistry(typeRegistry).parse().fileSet();
assertTypes(soyTree);
}
Aggregations