public void CheckWhiteSpaceUserNameFromPlaceFeedback()
        {
            FeedbackValidator feedbackValidator = new FeedbackValidator();
            var feedback = new FeedbackEntity()
            {
                email = "*****@*****.**", date = DateTime.Now, feedback = "Hey Great stuff", rating = 1, userName = "******"
            };

            feedbackValidator.placeFeedback(feedback);
        }
        public void CheckUserNameWithSpecialCharFromPlaceFeedback()
        {
            FeedbackValidator feedbackValidator = new FeedbackValidator();
            var feedback = new FeedbackEntity()
            {
                email = "*****@*****.**", date = DateTime.Now, feedback = "Hey Great stuff", rating = 1, userName = "******"
            };

            feedbackValidator.placeFeedback(feedback);
        }
        public void CheckForInvalidEmailAddressFromPlaceFeedback()
        {
            FeedbackValidator feedbackValidator = new FeedbackValidator();
            var feedback = new FeedbackEntity()
            {
                email = "email@email", date = DateTime.Now, feedback = "Hey Great stuff", rating = 1, userName = "******"
            };

            feedbackValidator.placeFeedback(feedback);
        }
        public void CheckForRatingAbove5FromPlaceFeedback()
        {
            FeedbackValidator feedbackValidator = new FeedbackValidator();
            var feedback = new FeedbackEntity()
            {
                email = "*****@*****.**", date = DateTime.Now, feedback = "Hey Great stuff", rating = 6, userName = "******"
            };

            feedbackValidator.placeFeedback(feedback);
        }
        public void CheckForDuplicateEmailAddressFromPlaceFeedback()
        {
            Dictionary <string, FeedbackEntity> currentFeedback = new Dictionary <string, FeedbackEntity>(StringComparer.InvariantCultureIgnoreCase);
            Dictionary <string, string>         currentEmails   = new Dictionary <string, string>(StringComparer.InvariantCultureIgnoreCase);

            currentEmails.Add("*****@*****.**", "Mazon");
            FeedbackValidator feedbackValidator = new FeedbackValidator(currentFeedback, currentEmails);

            var feedback = new FeedbackEntity()
            {
                email = "*****@*****.**", date = DateTime.Now, feedback = "Hey Great stuff", rating = 1, userName = "******"
            };

            feedbackValidator.placeFeedback(feedback);
        }
        public void CheckThatBlankFeedbackIsValid()
        {
            FeedbackValidator feedbackValidator = new FeedbackValidator();
            var feedback = new FeedbackEntity()
            {
                email = "*****@*****.**", date = DateTime.Now, feedback = "", rating = 1, userName = "******"
            };

            try
            {
                feedbackValidator.placeFeedback(feedback);
            }
            catch (Exception)
            {
                Assert.IsTrue(false, "Blank feedback should be valid");
            }
        }
        public void CheckForValidEmailAddressFromPlaceFeedback()
        {
            FeedbackValidator feedbackValidator = new FeedbackValidator();

            try
            {
                var feedback = new FeedbackEntity()
                {
                    email = "*****@*****.**", date = DateTime.Now, feedback = "Hey Great stuff", rating = 1, userName = "******"
                };
                feedbackValidator.placeFeedback(feedback);
            }
            catch (Exception)
            {
                Assert.IsTrue(false, "The email address [email protected] should be valid");
            }
        }