예제 #1
0
 public AbpCliAddAppService(
     AddPackageCommand addPackageCommand,
     AddModuleCommand addModuleCommand,
     ICurrentDirectoryHelper currentDirectoryHelper)
 {
     _addPackageCommand      = addPackageCommand;
     _addModuleCommand       = addModuleCommand;
     _currentDirectoryHelper = currentDirectoryHelper;
 }
예제 #2
0
        public void AddModuleCommandInvalidTypeOfArgument()
        {
            var modName = "module1";
            var modInt  = 1001;
            var flag1   = true;
            var flag2   = false;

            object[] values = new object[] { modName, modInt, flag1, flag2 };

            var command = new AddModuleCommand(values);
        }
예제 #3
0
        public void AddModuleCommandInvalidNumOfArguments()
        {
            var modName = "module1";
            var modType = "typeOfModule1";
            var flag1   = true;
            var flag2   = false;
            var overArg = "overArg";

            object[] values = new object[] { modName, modType, flag1, flag2, overArg };

            var command = new AddModuleCommand(values);
        }
예제 #4
0
        private void InitializeCommands()
        {
            var addModuleCommand = new AddModuleCommand();
            addModuleCommand.Initialize();
            ServiceLocator.Instance.Load(typeof(AddModuleCommand), addModuleCommand);

            var viewModuleCommand = new ViewModuleCommand();
            viewModuleCommand.Initialize();
            ServiceLocator.Instance.Load(typeof(ViewModuleCommand), addModuleCommand);

            var removeModuleCommand = new RemoveModuleCommand();
            removeModuleCommand.Initialize();
            ServiceLocator.Instance.Load(typeof(RemoveModuleCommand), addModuleCommand);
        }
예제 #5
0
        public void AddModuleCommandCorrectCreation()
        {
            var modName = "module1";
            var modType = "typeOfModule1";
            var flag1   = true;
            var flag2   = false;

            object[] values = new object[] { modName, modType, flag1, flag2 };

            var command = new AddModuleCommand(values);

            Assert.AreEqual("module1", command.SiteNameSlashModuleName);
            Assert.AreEqual("typeOfModule1", command.ModuleType);
            Assert.AreEqual(true, command.CreateRules);
            Assert.AreEqual(false, command.CreateModule);
        }
예제 #6
0
        private void InitializeCommands()
        {
            var addModuleCommand = new AddModuleCommand();

            addModuleCommand.Initialize();
            ServiceLocator.Instance.Load(typeof(AddModuleCommand), addModuleCommand);

            var viewModuleCommand = new ViewModuleCommand();

            viewModuleCommand.Initialize();
            ServiceLocator.Instance.Load(typeof(ViewModuleCommand), viewModuleCommand);

            var removeModuleCommand = new RemoveModuleCommand();

            removeModuleCommand.Initialize();
            ServiceLocator.Instance.Load(typeof(RemoveModuleCommand), removeModuleCommand);
        }
예제 #7
0
 public void AddModuleCommandArgumentsIsNull()
 {
     var command = new AddModuleCommand(null);
 }