Example #1
0
        public void DependenciesAreIncluded()
        {
            var registry = TypeRegistry.FromMessages(TestAllTypes.Descriptor);

            // Direct dependencies
            AssertDescriptorPresent(registry, ImportMessage.Descriptor);
            // Public dependencies
            AssertDescriptorPresent(registry, PublicImportMessage.Descriptor);
        }
Example #2
0
        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);
        }
Example #3
0
 public static TypeRegistry FromMessages(params MessageDescriptor[] messageDescriptors)
 {
     return(TypeRegistry.FromMessages(messageDescriptors));
 }