Esempio n. 1
0
    public void AddReviewContent()
    {
        ServiceGateway.ReviewDto dto =
            gateway.AddReview(reviewerName, reviewContent, rating, Recording.Id);

        Assert.AreEqual(reviewerName, dto.reviewerName);
        Assert.AreEqual(reviewContent, dto.reviewContent);
        Assert.AreEqual(rating, dto.rating);

        gateway.DeleteReview(dto.id);
    }
Esempio n. 2
0
    public void ReviewAddedToRecording()
    {
        int beforeCount = Recording.GetReviews().Length;

        ServiceGateway.ReviewDto dto =
            gateway.AddReview(reviewerName, reviewContent, rating, Recording.Id);

        ServiceGateway.RecordingDto recordingDto = gateway.FindByRecordingId(Recording.Id);
        Assert.AreEqual(beforeCount + 1, recordingDto.reviews.Length);

        gateway.DeleteReview(dto.id);
    }
Esempio n. 3
0
    public void ReviewDeletedFromRecording()
    {
        ServiceGateway.RecordingDto recordingDto =
            gateway.FindByRecordingId(Recording.Id);
        Assert.IsNull(recordingDto.reviews);

        ServiceGateway.ReviewDto dto =
            gateway.AddReview(reviewerName, reviewContent, rating, Recording.Id);
        gateway.DeleteReview(dto.id);

        recordingDto = gateway.FindByRecordingId(Recording.Id);
        Assert.IsNull(recordingDto.reviews);
    }
Esempio n. 4
0
        public override void CustomizeRecording()
        {
            gateway = new CatalogGateway();

            review = gateway.AddReview(reviewerName, reviewContent, rating, Recording.Id);

            try
            {
                gateway.AddReview(reviewerName, reviewContent, rating, Recording.Id);
            }
            catch (SoapException exception)
            {
                soapException = exception;
            }
        }
Esempio n. 5
0
    public new void SetUp()
    {
        base.SetUp();

        gateway = new CatalogGateway();

        review = gateway.AddReview(reviewerName, reviewContent, rating, Recording.Id);

        try
        {
            gateway.AddReview(reviewerName, reviewContent, rating, Recording.Id);
        }
        catch (SoapException exception)
        {
            soapException = exception;
        }
    }