Esempio n. 1
0
        internal void TryParse(string value, bool expectedResult, ReportArchive.ReportArchiveValue expectedMode)
        {
            ReportArchive actualMode;
            bool          actualResult = ReportArchive.TryParse(value, out actualMode);

            Assert.AreEqual(expectedResult, actualResult);
            Assert.AreEqual(expectedMode, actualMode.Value);
        }
Esempio n. 2
0
        private bool Prepare()
        {
            outputPath = Args.ReportOutput ?? Environment.CurrentDirectory;

            try
            {
                inputFileNames = GenericCollectionUtils.ConvertAllToArray(Args.ReportPaths,
                                                                          path => new Pair <string, string>(Path.GetDirectoryName(path), Path.GetFileNameWithoutExtension(path)));
            }
            catch (ArgumentException exception)
            {
                Context.Logger.Log(LogSeverity.Error, "One or several of the specified reports are not valid file paths.", exception);
                return(false);
            }

            return(ReportArchive.TryParse(Args.ReportArchive, out reportArchive));
        }
        private bool Prepare()
        {
            outputPath = Args.ReportOutput ?? Environment.CurrentDirectory;

            try
            {
                inputPath = Path.GetDirectoryName(Args.ReportPath);
                inputName = Path.GetFileNameWithoutExtension(Args.ReportPath);
            }
            catch (ArgumentException exception)
            {
                Context.Logger.Log(LogSeverity.Error, "The specified report is not a valid file path.", exception);
                return(false);
            }

            return(ReportArchive.TryParse(Args.ReportArchive, out reportArchive));
        }