public void GetConnectionTest() { // Arrange using (var source = new DataSourceImpl(() => new DsTestConnection())) { // Act var actual = source.GetConnection(); // Assert Assert.IsNotNull(actual); Assert.AreEqual(typeof(DsTestConnection), actual.GetType()); } }
public void DisposeTest() { // Arrange var connection = new DsTestConnection(); var source = new DataSourceImpl(() => connection); // Act var actual = (DsTestConnection)source.GetConnection(); source.Dispose(); // Assert Assert.IsTrue(actual.IsDispose); }