public void GetLast_WithNoCodeReviews_ReturnsNull()
        {
            // Arrange
            var data = new List <CodeReview>().AsQueryable();

            var mockContext = BuildCodeReviewContext(data);

            var target = new CodeReviewRepository(mockContext.Object);

            /// Act
            var act = target.GetLast();

            // Assert
            Assert.IsNull(act);
        }
        public void GetLast_WithCodeREviews_ReturnsLastBuild()
        {
            // Arrange
            var data = new List <CodeReview>
            {
                new CodeReview {
                    Id = 1, CreatedAt = new DateTime(2014, 01, 01)
                },
                new CodeReview {
                    Id = 2, CreatedAt = new DateTime(2014, 01, 02)
                }
            }
            .AsQueryable();

            var mockContext = BuildCodeReviewContext(data);

            var target = new CodeReviewRepository(mockContext.Object);

            /// Act
            var act = target.GetLast();

            // Assert
            Assert.AreEqual(2, act.Id);
        }