protected override void Arrange()
 {
     base.Arrange();
     Options = new WhatIfExecution {
         DatabaseType = DatabaseType.ODS
     };
 }
Example #2
0
            protected override void Arrange()
            {
                _options = new WhatIfExecution
                {
                    Engine           = EngineType.SqlServer,
                    DatabaseType     = DatabaseType.ODS,
                    ConnectionString = "Valid Connection String",
                    Features         = new List <string>
                    {
                        "Changes",
                        "Sample"
                    }
                };

                _databaseCommand = Stub <IDatabaseCommand>();

                _databaseCommandFactory = Stub <IDatabaseCommandFactory>();

                A.CallTo(() => _databaseCommandFactory.CreateDatabaseCommands(A <EngineType> ._))
                .Returns(new List <IDatabaseCommand> {
                    _databaseCommand
                });

                _compositeSpecification = Stub <ICompositeSpecification>();

                A.CallTo(() => _compositeSpecification.IsSatisfiedBy(A <object> ._))
                .Returns(true);

                A.CallTo(() => _databaseCommand.Execute(A <IOptions> ._))
                .Returns(
                    new DatabaseCommandResult
                {
                    IsSuccessful    = true,
                    RequiresUpgrade = false
                });

                var compositeSpecifications = new List <ICompositeSpecification> {
                    _compositeSpecification
                };

                _result = -99;

                _sut = new ApplicationRunner(_options, _databaseCommandFactory, compositeSpecifications);
            }