Esempio n. 1
0
        public void OperationConnectionParametersTest()
        {
            var operations                 = new CosmosDBServiceOperationProvider();
            var connectionParameters       = operations.GetService().Properties.ConnectionParameters as ConnectionParameters;
            var connectionStringParameters = new ConnectionStringParameters
            {
                Type            = ConnectionStringType.SecureString,
                ParameterSource = ConnectionParameterSource.AppConfiguration,
                UIDefinition    = new UIDefinition
                {
                    DisplayName = "Connection String",
                    Tooltip     = "Provide Azure Cosmos db Connection String",
                    Constraints = new Constraints
                    {
                        Required = "true",
                    },
                    Description = "Azure Cosmos db Connection String",
                },
            };

            Assert.Equal(connectionParameters.ConnectionString.ToJson(), connectionStringParameters.ToJson());
            this.outputLogger.WriteLine("Connection parameters are matched");
        }
 /// <inheritdoc/>
 public override string CreateConnectionString(ConnectionStringParameters parameters)
 {
     return(this.CreateConnectionString(new AuthorizedConnectionStringParameters(parameters.Database, "postgres", "qwerty12345")));
 }