public CustomResourcesInDocumentTests()
        {
            var customBasicStructureDefinitionJson = TestResourceReader.ReadTestData("CustomBasic-StructureDefinition-R3.json");
            var customBasicStructureDefinition     = new FhirJsonParser().Parse <StructureDefinition>(customBasicStructureDefinitionJson);

            _schemaProvider  = SchemaProviders.CreateCustomSchemaProvider(customBasicStructureDefinition);
            _documentService = new DocumentService(_searchMock.Object, _changeMock.Object, _schemaProvider, _logger);
        }
Example #2
0
        protected override IEnumerable <string> Generate_Other(Zetbox.API.IZetboxContext ctx)
        {
            using (log4net.NDC.Push("EfGenerateOther"))
            {
                var otherFileNames = new List <string>();

                // those are not compilable, therefore don't add them to otherFileNames.
                // should be handled separately in the ProjectFile Template
                this.RunTemplate(ctx, "EfModel.ModelCsdl", "Model.csdl");
                this.RunTemplate(ctx, "EfModel.ModelMsl", "Model.msl");
                foreach (var schemaProvider in SchemaProviders.Where(sp => sp.IsStorageProvider))
                {
                    this.RunTemplate(ctx, "EfModel.ModelSsdl", String.Format("Model.{0}.ssdl", schemaProvider.ConfigName), schemaProvider);
                }
                otherFileNames.Add(this.RunTemplateWithExtension(ctx, "ObjectClasses.AssociationSetAttributes", "AssociationSetAttributes", "cs"));

                return(base.Generate_Other(ctx).Concat(otherFileNames));
            }
        }