Esempio n. 1
0
        public void CanAdd()
        {
            var settingsStoreMock = new Mock <IConnectionSettingsStore>();

            settingsStoreMock.Setup(m => m.Load()).Returns(new ConnectionSettings[] { });

            var repository = new ConnectionSettingsRepository(settingsStoreMock.Object);

            var factoryMock = new Mock <IBuildProviderStrategy>();

            var connectionPool = new ConnectionPool(repository, factoryMock.Object);

            repository.Add(new ConnectionSettingsA());

            connectionPool.CurrentConnections.Count().ShouldBe(1);
        }