public void DependenciesAreIncluded() { var registry = TypeRegistry.FromMessages(TestAllTypes.Descriptor); // Direct dependencies AssertDescriptorPresent(registry, ImportMessage.Descriptor); // Public dependencies AssertDescriptorPresent(registry, PublicImportMessage.Descriptor); }
public void TypesFromSameFile() { // Just for kicks, let's start with a nested type var registry = TypeRegistry.FromMessages(TestAllTypes.Types.NestedMessage.Descriptor); // Top-level... AssertDescriptorPresent(registry, TestFieldOrderings.Descriptor); // ... and nested (not the same as the original NestedMessage!) AssertDescriptorPresent(registry, TestFieldOrderings.Types.NestedMessage.Descriptor); }
public static TypeRegistry FromMessages(params MessageDescriptor[] messageDescriptors) { return(TypeRegistry.FromMessages(messageDescriptors)); }