public void UpdateConfiguration_WithNullSqlServerServiceInfo_ReturnsExpected() { var configurer = new SqlServerProviderConfigurer(); configurer.UpdateConfiguration(null, config); Assert.Equal("localhost", config.Server); Assert.Equal("username", config.Username); Assert.Equal("password", config.Password); Assert.Equal("database", config.Database); Assert.Null(config.ConnectionString); }
public void Update_With_ServiceInfo_CredsInUrl_Updates_Config() { var configurer = new SqlServerProviderConfigurer(); var si = new SqlServerServiceInfo("MyId", "sqlserver://*****:*****@updatedserver:1433;databaseName=updateddb"); configurer.UpdateConfiguration(si, config); Assert.Equal("updatedserver", config.Server); Assert.Equal("updateddb", config.Database); Assert.Equal("updateduser", config.Username); Assert.Equal("updatedpassword", config.Password); }
public void Update_With_ServiceInfo_Updates_Config() { SqlServerProviderConfigurer configurer = new SqlServerProviderConfigurer(); SqlServerServiceInfo si = new SqlServerServiceInfo("MyId", "jdbc:sqlserver://updatedserver:1433/databaseName=updateddb", "updateduser", "updatedpassword"); configurer.UpdateConfiguration(si, config); Assert.Equal("updatedserver", config.Server); Assert.Equal("updateddb", config.Database); Assert.Equal("updateduser", config.Username); Assert.Equal("updatedpassword", config.Password); }