public void GivenAConformanceBuilder_WhenAddingDefaultInteractions_ThenAuditEventDoesntHaveUpdateDelete() { _builder.PopulateDefaultResourceInteractions(); 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); }
public void Build(ICapabilityStatementBuilder builder) { EnsureArg.IsNotNull(builder, nameof(builder)); builder.PopulateDefaultResourceInteractions() .SyncSearchParameters() .AddGlobalSearchParameters() .SyncProfiles(); if (_coreFeatures.SupportsBatch) { // Batch supported added in listedCapability builder.AddGlobalInteraction(SystemRestfulInteraction.Batch); } if (_coreFeatures.SupportsTransaction) { // Transaction supported added in listedCapability builder.AddGlobalInteraction(SystemRestfulInteraction.Transaction); } }