public void CreateNew_WithValidSchemaContents_ShouldNewSchema()
        {
            var factory  = new ProtoBufSchemaFactory();
            var contents = SchemaFixtureUtils.GetProtoBuf("ValidSchema");

            Schema <FileDescriptorSet> schema = factory.CreateNew(new Version(1), contents);

            Assert.NotNull(schema);
        }
Пример #2
0
        public void Parsed_ShouldReturnParsedSchemaContents()
        {
            string contents = SchemaFixtureUtils.GetProtoBuf("ValidSchema");
            var    schema   = new ProtoBufSchema(
                Guid.NewGuid(),
                new SchemaGroupAggregate.Schemas.Version(1),
                contents);

            FileDescriptorSet descriptor = schema.Parsed;

            Assert.NotNull(descriptor);
            Assert.Empty(descriptor.GetErrors());
        }