public void Configure_NoServiceInfo_ReturnsExpected() { var config = new OracleProviderConnectorOptions() { Server = "localhost", Port = 1234, Username = "******", Password = "******", ServiceName = "orcl" }; var configurer = new OracleProviderConfigurer(); var opts = configurer.Configure(null, config); var connectionString = string.Format("User Id={0};Password={1};Data Source={2}:{3}/{4};", config.Username, config.Password, config.Server, config.Port, config.ServiceName); Assert.StartsWith(connectionString, opts); }
public void Configure_ServiceInfoOveridesConfig_ReturnsExpected() { var config = new OracleProviderConnectorOptions() { Server = "localhost", Port = 1234, Username = "******", Password = "******", ServiceName = "orcl" }; var configurer = new OracleProviderConfigurer(); var si = new OracleServiceInfo("MyId", "oracle://*****:*****@localhost:1521/orclpdb1"); _ = configurer.Configure(si, config); Assert.Equal("localhost", config.Server); Assert.Equal(1521, config.Port); Assert.Equal("user", config.Username); Assert.Equal("pwd", config.Password); Assert.Equal("orclpdb1", config.ServiceName); }