public DocumentInvoker(DocumentCommand discmd, DocumentCommand undcmd, DocumentCommand redcmd)
        {
            this._discmd = discmd;

            this._undcmd = undcmd;

            this._redcmd = redcmd;
        }
Exemple #2
0
        public void RedoTest()
        {
            DocumentCommand discmd = null;                                        // TODO: Initialize to an appropriate value
            DocumentCommand undcmd = null;                                        // TODO: Initialize to an appropriate value
            DocumentCommand redcmd = null;                                        // TODO: Initialize to an appropriate value
            DocumentInvoker target = new DocumentInvoker(discmd, undcmd, redcmd); // TODO: Initialize to an appropriate value

            target.Redo();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
Exemple #3
0
        private DocumentCommand GetDocument()
        {
            DocumentCommand document = new DocumentCommand();

            if (IsHelpRequested(document))
            {
                return(document);
            }
            bool metUnknownOption = false;

            while (!metUnknownOption && Eat() is string option)
            {
                switch (option)
                {
                case "-j":
                case "--json":
                    document.ToJson = GetBoolean();
                    break;

                case "-o":
                case "--output":
                    string folder = GetString();
                    if (folder is null)
                    {
                        throw logger.Error(new OptionException(option, "output parameter need a string value."));
                    }
                    document.OutputFolder = folder;
                    break;

                default:
                    metUnknownOption = document.ModelName != null;
                    if (!metUnknownOption)
                    {
                        document.ModelName = arg;
                    }
                    break;
                }
            }
            return(document);
        }