public void Test_Rebase_Option_Throws_Not_Implemented_Exception()
        {
            //arrange
            var traceService         = new Mock <ITraceService>();
            var environmentService   = new Mock <IEnvironmentService>();
            var workspaceService     = new Mock <IWorkspaceService>();
            var configurationService = new Mock <IConfigurationService>();

            var migrationService        = new Mock <IMigrationService>();
            var migrationServiceFactory = new Mock <CLI.IMigrationServiceFactory>();

            migrationServiceFactory.Setup(s => s.Create("sqlserver")).Returns(migrationService.Object);

            var dataService        = new Mock <IDataService>();
            var dataServiceFactory = new Mock <CLI.IDataServiceFactory>();

            dataServiceFactory.Setup(s => s.Create("sqlserver")).Returns(dataService.Object);

            //act
            var option     = new RebaseOption {
            };
            var sut        = new CommandLineService(migrationServiceFactory.Object, dataServiceFactory.Object, workspaceService.Object, environmentService.Object, traceService.Object, configurationService.Object);
            var returnCode = sut.RunRebaseOption(option);

            returnCode.ShouldNotBe(0);
        }
Ejemplo n.º 2
0
 public int RunRebaseOption(RebaseOption opts)
 {
     try
     {
         throw new NotImplementedException("Not yet implemented, stay tune!");
     } catch (Exception ex)
     {
         return(OnException(ex, "Failed to execute rebase function", opts.Debug, _traceService));
     }
 }
Ejemplo n.º 3
0
 public int RunRebaseOption(RebaseOption opts)
 {
     try
     {
         throw new NotImplementedException("Not yet implemented, stay tune!");
     }
     catch (Exception ex)
     {
         _traceService.Error($"Failed to execute info function. {Environment.NewLine}{ex.ToString()}");
         return(1);
     }
 }
Ejemplo n.º 4
0
        public void Test_Rebase_Option_Throws_Not_Implemented_Exception()
        {
            //arrange
            var traceService            = new Mock <ITraceService>();
            var environmentService      = new Mock <IEnvironmentService>();
            var localVersionService     = new Mock <ILocalVersionService>();
            var migrationService        = new Mock <IMigrationService>();
            var migrationServiceFactory = new Mock <CLI.IMigrationServiceFactory>();

            migrationServiceFactory.Setup(s => s.Create("sqlserver")).Returns(migrationService.Object);

            //act
            Assert.ThrowsException <NotImplementedException>(() =>
            {
                var option = new RebaseOption {
                };
                var sut    = new CommandLineService(migrationServiceFactory.Object, localVersionService.Object, environmentService.Object, traceService.Object);
                sut.RunRebaseOption(option);
            });
        }
Ejemplo n.º 5
0
 public object RunRebaseOption(RebaseOption opts)
 {
     throw new NotImplementedException("Not yet implemented, stay tune!");
 }