public void FindAllResourceTemplatesWithMessageBusOnly(AzureIntegrationServicesModel model, IEnumerable <TargetResourceTemplate> resources, Exception e)
        {
            "Given a model"
            .x(() => model = _model);

            "And the model only has resources for the message bus"
            .x(() =>
            {
                _model.MigrationTarget.MessageBus.Applications.SelectMany(a => a.Channels).ToList().ForEach(a => a.Resources.Clear());
                _model.MigrationTarget.MessageBus.Applications.SelectMany(a => a.Endpoints).ToList().ForEach(a => a.Resources.Clear());
                _model.MigrationTarget.MessageBus.Applications.SelectMany(a => a.Messages).ToList().ForEach(a => a.Resources.Clear());
                _model.MigrationTarget.MessageBus.Applications.SelectMany(a => a.Intermediaries).ToList().ForEach(a => a.Resources.Clear());
            });

            "When finding all resource templates"
            .x(() => e = Record.Exception(() => resources = CustomLiquidFunctions.FindAllResourceTemplates(model)));

            "Then the find should succeed"
            .x(() => e.Should().BeNull());

            "And the target resource should be the expected value from the model"
            .x(() =>
            {
                resources.Should().NotBeNullOrEmpty();
                resources.Should().HaveCount(1);
            });
        }
        public void FindAllResourceTemplatesWithNullModel(AzureIntegrationServicesModel model, IEnumerable <TargetResourceTemplate> resources, Exception e)
        {
            "Given a null model"
            .x(() => model = null);

            "When finding all resource templates"
            .x(() => e = Record.Exception(() => resources = CustomLiquidFunctions.FindAllResourceTemplates(model)));

            "Then the find should succeed"
            .x(() => e.Should().BeNull());

            "And the target resource should be the expected value from the model"
            .x(() =>
            {
                resources.Should().BeNull();
            });
        }