public void GetConnection_DataSourceNotFound_Test() { // Arrange const string NOT_FOUND_DS_NAME = "HogeSource"; var source = new MultiDataSource(); // Act TestUtils.ExecuteExcectedException <ArgumentException>(() => { source.GetConnection(NOT_FOUND_DS_NAME); }); }
public void GetConnection_NoDataSourceName_Test() { // Arrange var source = new MultiDataSource(); source.DefaultDataSource = new DataSourceImpl(() => new MultiDsTestConnection()); // Act var actual = source.GetConnection(); // Assert Assert.IsNotNull(actual); }
public void GetConnection_DataSourceName_Test() { // Arrange const string TEST_DS_NAME = "HogeSource"; var source = new MultiDataSource(); source.RegisterDataSource(TEST_DS_NAME, new DataSourceImpl(() => new MultiDsTestConnection())); // Act var actual = source.GetConnection(TEST_DS_NAME); // Assert Assert.IsNotNull(actual); }