Example #1
0
        /// <summary>
        /// Runs User Login Test Case.
        /// </summary>
        /// <param name="objhelper">HelperClass object</param>
        /// <returns>true if login is success, false otherwise</returns>
        internal bool TestSuiteRunner(HelperClass objhelper)
        {
            Console.WriteLine(PhotomailMessages.TextUserLoginTCName + PhotomailMessages.MsgTestCaseStartedTag);
            try
            {
                this.objHelper = objhelper;
                this.httpBasic = new HttpBasicFunctionality(this.objHelper);
                Logger.AddComment(PhotomailMessages.TextUserLoginTCName + PhotomailMessages.MsgTestCaseStartedTag, Logger.CommentType.Message);

                // Login to Photos Home Page.
                return(this.HomepageLogOn());
            }
            catch (PhotomailException pex)
            {
                Logger.AddComment(PhotomailMessages.TextUserLoginTCName + PhotomailMessages.MsgFailedTag, Logger.CommentType.Message);
                Logger.AddComment(PhotomailMessages.TextReasonForFailure + pex.Message, Logger.CommentType.Message);
                Logger.AddComment(string.Empty, Logger.CommentType.Fail);
                return(false);
            }
            catch (Exception ex)
            {
                Logger.AddComment(PhotomailMessages.TextUserLoginTCName + PhotomailMessages.MsgFailedTag, Logger.CommentType.Message);
                Logger.AddComment(PhotomailMessages.TextReasonForFailure + ex.Message, Logger.CommentType.Message);
                Logger.AddComment(string.Empty, Logger.CommentType.Fail);
                return(false);
            }
        }
Example #2
0
        /// <summary>
        /// Startup for the Photomail Test Suite
        /// </summary>
        /// <param name="objhelper">HelperClass object</param>
        internal void TestSuiteRunner(HelperClass objhelper)
        {
            try
            {
                this.objHelper = objhelper;
                this.httpBasic = new HttpBasicFunctionality(this.objHelper);

                //// creating album at skydrive
                Console.WriteLine(PhotomailMessages.TextCreateAlbum + PhotomailMessages.MsgTestCaseStartedTag);
                Logger.AddComment(PhotomailMessages.TextCreateAlbum + PhotomailMessages.MsgTestCaseStartedTag, Logger.CommentType.Message);
                this.CreateAlbumAtSkyDrive(DateTime.Now.ToString(), this.objHelper.EnvNode[PhotomailMessages.TextUserEmailAddress] + DateTime.Now.ToString() + "Pic");

                //// Sending a Photomail.
                Console.WriteLine(PhotomailMessages.TextSendPhotomailTCName + PhotomailMessages.MsgTestCaseStartedTag);
                Logger.AddComment(PhotomailMessages.TextSendPhotomailTCName + PhotomailMessages.MsgTestCaseStartedTag, Logger.CommentType.Message);
                this.SendPhotoMail();
            }
            catch (PhotomailException)
            {
                throw;
            }
            catch (Exception)
            {
                throw;
            }
        }