Ejemplo n.º 1
0
 public override int CompareTo(BaseAuthor author)
 {
     if (this.GetBooksCount() > author.GetBooksCount())
     {
         return(1);
     }
     else if (this.GetBooksCount() < author.GetBooksCount())
     {
         return(-1);
     }
     else
     {
         return(0);
     }
 }
        private BaseAuthor NewUpAuthor(string authorTypeName, string rootPath = null)
        {
            BaseAuthor result     = null;
            var        reportPath = rootPath.isNull() ? Configuration.TestReportFilePath : rootPath;

            switch (authorTypeName)
            {
            case "EXCEL":
                //result = new ExcelAuthor(reportPath);
                break;

            case "HTML":
                result = new HTMLAuthor(reportPath);
                break;
            }

            if (result == null)
            {
                throw new Exception(string.Format("Config setting (for 'TestExecutionerAuthor / MultiAuthor_Authors' should be / contain 'MULTIPLE', 'EXCEL', 'REMOTE', or 'HTML', actual value '{0}'. Unable to create author object", authorTypeName));
            }

            return(result);
        }