Beispiel #1
0
        public void SubmitReviewTest()
        {
            RentItClient target = new RentItClient();
            const string User = "******";
            const int MediaId = 79;
            MediaReview review = new MediaReview
            {
                MediaId = MediaId,
                Rating = Rating.Three,
                ReviewText = "Bucketboy, yes.",
                Timestamp = DateTime.Now,
                UserName = User
            };

            AccountCredentials credentials = new AccountCredentials
            {
                UserName = User,
                HashedPassword = "******"
            };
            bool actual = target.SubmitReview(review, credentials);
            Assert.IsTrue(actual);
            this.SubmitReviewCleanup(User, MediaId);
        }
Beispiel #2
0
        public void SubmitReviewExceptionTest()
        {
            RentItClient target = new RentItClient();
            MediaReview review = new MediaReview
            {
                MediaId = 64,
                Rating = Rating.Three,
                ReviewText = "Bucket.",
                Timestamp = DateTime.Now,
                UserName = "******"
            };

            AccountCredentials credentials = new AccountCredentials
            {
                UserName = "******",
                HashedPassword = "******"
            };
            target.SubmitReview(review, credentials);
            target.SubmitReview(review, credentials);
        }