public void CreatingWithDefaults(SsisConfiguration config)
 {
     "Given a default SsisConfiguration"
     ._(() => config = new SsisConfiguration());
     "Then the ConnectionProvider property should not be null"
     ._(() => config.ConnectionProvider.Should().NotBeNull());
 }
Exemple #2
0
 public SsisApplication(SsisConfiguration configuration)
 {
     if (configuration == null)
     {
         throw new ArgumentNullException("configuration");
     }
     _configuration = configuration;
 }
 public void WhenCallingSetConnectionProviderWithANullParameter(SsisConfiguration config, Action theCall)
 {
     "Given an SsisConfiguration instance"
     ._(() => config = new SsisConfiguration());
     "When SetConnectionProvider is passed a null"
     ._(() => theCall = config.Invoking(cfg => cfg.SetConnectionProvider(null)));
     "Then we should throw an ArgumentNullException"
     ._(() => theCall.ShouldThrow <ArgumentNullException>().Where(ex => ex.ParamName == "connectionProvider"));
 }
Exemple #4
0
 public void WhenCreatingByProvidingConfigurationObject(SsisApplication application, SsisConfiguration configuration)
 {
     "Given a SsisApplication created from the parameterless constructor"
     ._(() =>
     {
         configuration = new SsisConfiguration();
         application   = new SsisApplication(configuration);
     });
     "Then the Configuration property should be the same as the passed in configuration"
     ._(() => application.Configuration.Should().BeSameAs(configuration));
 }
Exemple #5
0
 public void WhenCreatingByProvidingANullConfigurationObject(SsisApplication application, Action ctorCall)
 {
     "Given a constructor call with a null configuration"
     ._(() =>
     {
         SsisConfiguration configuration = null;
         ctorCall = () => application = new SsisApplication(configuration);
     });
     "Then the constructor should throw an ArgumentNullException"
     ._(() => ctorCall.ShouldThrow <ArgumentNullException>().Where(ex => ex.ParamName == "configuration"));
 }
 public void WhenCallingSetConnectionProvider(SsisConfiguration config, Func <string, IDbConnection> connectionProvider)
 {
     "Given an SsisConfiguration instance"
     ._(() =>
     {
         config             = new SsisConfiguration();
         connectionProvider = A.Fake <Func <string, IDbConnection> >();
     });
     "When SetConnectionProvider is called with a non-null value"
     ._(() => config.SetConnectionProvider(connectionProvider));
     "Then the ConnectionProvider property should have been set"
     ._(() => config.ConnectionProvider.Should().BeSameAs(connectionProvider));
 }