public void Connection_ConstructorSetsProperties() { var target = new Connection(ConnectionFakes.GetFake()); Assert.AreEqual(ConnectionFakes.Name, target.Name); Assert.AreEqual(ConnectionFakes.ConnectionString, target.ConnectionString); Assert.AreEqual(ConnectionFakes.Provider, target.ProviderName); }
public void ConnectionLibrary_IgnoresLocalSqlConnection() { var dummy = new ConnectionStringSettingsCollection(); dummy.Add(ConnectionFakes.GetLocalSqlServer()); dummy.Add(ConnectionFakes.GetFake()); var target = new ConnectionLibrary(dummy); var result = target.GetConnections(); Assert.AreEqual(1, result.Count); CollectionAssert.AllItemsAreNotNull(result); Assert.AreEqual(ConnectionFakes.Name, result.FirstOrDefault().Name); }