示例#1
0
        public void ShouldShowDialogTest(bool exceededRatingRequestLimit, bool exceededChaseTimeGapLimit, bool expected)
        {
            // Arrange
            var sut = new RatingDecider();

            // Act
            var actual = sut.ShouldShowDialog(exceededRatingRequestLimit, exceededChaseTimeGapLimit);

            // Assert
            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void ExceededRatingRequestLimitTest(int ratingRequestCount, int ratingRequestLimit, bool expected)
        {
            // Arrange
            var sut = new RatingDecider();

            // Act
            var actual = sut.ExceededRatingRequestLimit(ratingRequestCount, ratingRequestLimit);

            // Assert
            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void ExceededRatingRequestGapTest4()
        {
            // Arrange
            var sut = new RatingDecider();
            var ratingRequestGap  = 3;
            var lastRatingRequest = new DateTime(2017, 6, 1, 0, 0, 0);
            var now      = new DateTime(2017, 10, 2, 0, 0, 0);
            var expected = true;

            // Act
            var actual = sut.ExceededRatingRequestGap(lastRatingRequest, ratingRequestGap, now);

            // Assert
            Assert.AreEqual(expected, actual);
        }