Example #1
0
        public void ProvidingOnlyHelpArgumentShouldSucceed()
        {
            const string arguments = "--help";
            int          exitCode  = MigrateProcess.Execute(arguments);

            Assert.AreEqual(SuccessExitCode, exitCode);
        }
Example #2
0
        public void ProvidingNoArgumentsShouldFail()
        {
            int exitCode = MigrateProcess.Execute(null);

#if NET462
            Assert.AreEqual(MigSharp.Migrate.Program.InvalidArgumentsExitCode, exitCode);
#elif NETCOREAPP2_0
            Assert.AreEqual(Cli.Program.InvalidArgumentsExitCode, exitCode);
#endif
        }
Example #3
0
        public void ProvidingNotExistingAssemblyShouldFail()
        {
            const string arguments = "qa some.dll";
            int          exitCode  = MigrateProcess.Execute(arguments);

#if NET462
            Assert.AreEqual(MigSharp.Migrate.Program.FailedMigrationExitCode, exitCode);
#elif NETCOREAPP2_0
            Assert.AreEqual(Cli.Program.FailedMigrationExitCode, exitCode);
#endif
        }
Example #4
0
        public void ProvidingNotExistingTargetShouldFail()
        {
            const string arguments = "target-xxx some.dll";
            int          exitCode  = MigrateProcess.Execute(arguments);

#if NET462
            Assert.AreEqual(MigSharp.Migrate.Program.InvalidTargetExitCode, exitCode);
#elif NETCOREAPP2_0
            Assert.AreEqual(Cli.Program.InvalidTargetExitCode, exitCode);
#endif
        }