コード例 #1
0
        public void GivenAConformanceBuilder_WhenAddingDefaultInteractions_ThenAuditEventDoesntHaveUpdateDelete()
        {
            _builder.AddDefaultResourceInteractions();

            ITypedElement statement = _builder.Build();

            bool hasCreate = (bool)statement.Scalar($"{ResourceQuery("AuditEvent")}.interaction.where(code = '{TypeRestfulInteraction.Create}').exists()");
            bool noUpdate  = (bool)statement.Scalar($"{ResourceQuery("AuditEvent")}.interaction.where(code = '{TypeRestfulInteraction.Update}').exists()");
            bool noDelete  = (bool)statement.Scalar($"{ResourceQuery("AuditEvent")}.interaction.where(code = '{TypeRestfulInteraction.Delete}').exists()");

            Assert.True(hasCreate);
            Assert.False(noUpdate);
            Assert.False(noDelete);
        }
コード例 #2
0
        public void Build(ICapabilityStatementBuilder builder)
        {
            EnsureArg.IsNotNull(builder, nameof(builder));

            builder.AddDefaultResourceInteractions()
            .AddDefaultSearchParameters();

            if (_coreFeatures.SupportsBatch)
            {
                builder.AddRestInteraction(SystemRestfulInteraction.Batch);
            }
        }
コード例 #3
0
        public void Build(ICapabilityStatementBuilder builder)
        {
            EnsureArg.IsNotNull(builder, nameof(builder));
            builder.AddDefaultResourceInteractions()
            .AddDefaultSearchParameters();

            // if (_coreFeatures.SupportsBatch)
            //            {
            //                // Batch supported added in listedCapability
            //                builder.AddRestInteraction(SystemRestfulInteraction.Batch);
            //            }
            //
            //            if (_coreFeatures.SupportsTransaction)
            //            {
            //                // Transaction supported added in listedCapability
            //                builder.AddRestInteraction(SystemRestfulInteraction.Transaction);
            //            }
        }