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); }
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); }
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); }
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; } }
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; } }