public void GivenAConformanceBuilder_WhenVersionofResourceIsDifferentFromDefault_ThenResourceUsesResourceSpecificVersionLogic()
        {
            IOptions <CoreFeatureConfiguration> configuration = Substitute.For <IOptions <CoreFeatureConfiguration> >();
            Dictionary <string, string>         overrides     = new();
            VersioningConfiguration             versionConfig = new();

            versionConfig.ResourceTypeOverrides.Add("Patient", "no-version");

            configuration.Value.Returns(new CoreFeatureConfiguration()
            {
                Versioning = versionConfig
            });
            var supportedProfiles = Substitute.For <IKnowSupportedProfiles>();
            var builder           = CapabilityStatementBuilder.Create(
                ModelInfoProvider.Instance,
                _searchParameterDefinitionManager,
                configuration,
                supportedProfiles);
            ICapabilityStatementBuilder capabilityStatement = builder.ApplyToResource("Patient", c =>
            {
                c.Interaction.Add(new ResourceInteractionComponent
                {
                    Code = "create",
                });
            });
            ITypedElement resource = capabilityStatement.Build();

            var patientResource = ((CapabilityStatement)resource.ToPoco()).Rest.First().Resource.First();

            Assert.True(patientResource.Type == ResourceType.Patient);
            Assert.True(patientResource.Versioning == CapabilityStatement.ResourceVersionPolicy.NoVersion);
        }
 public ConformanceBuilderTests()
 {
     _searchParameterDefinitionManager = Substitute.For <ISearchParameterDefinitionManager>();
     _builder = CapabilityStatementBuilder.Create(
         ModelInfoProvider.Instance,
         _searchParameterDefinitionManager);
 }
        public ConformanceBuilderTests()
        {
            IOptions <CoreFeatureConfiguration> configuration = Substitute.For <IOptions <CoreFeatureConfiguration> >();

            configuration.Value.Returns(new CoreFeatureConfiguration());

            _searchParameterDefinitionManager = Substitute.For <ISearchParameterDefinitionManager>();
            _supportedProfiles = Substitute.For <IKnowSupportedProfiles>();
            _builder           = CapabilityStatementBuilder.Create(
                ModelInfoProvider.Instance,
                _searchParameterDefinitionManager,
                configuration,
                _supportedProfiles);
        }