コード例 #1
0
        public void Returns5LastColumnValuesGivenGridOfAscendingRows()
        {
            var result = SaddleAnalyzer.GetSaddleValues(GetTestGrid());

            Assert.AreEqual(5, result.Count);
            Assert.AreEqual(5, result.Count(r => r.Value == 4));
        }
コード例 #2
0
        public void ReturnsEmptyListGivenNoSaddleGrid()
        {
            var result = SaddleAnalyzer.GetSaddleValues(GetNoSaddleGrid());

            Assert.False(result.Any());
        }
コード例 #3
0
        public void ReturnsOneItemGivenGridOfProducts()
        {
            var result = SaddleAnalyzer.GetSaddleValues(GetProductGrid());

            Assert.AreEqual(1, result.Count(r => r.Value == 5));
        }
コード例 #4
0
        public void Returns25NumbersGivenGridOfSameValue()
        {
            var result = SaddleAnalyzer.GetSaddleValues(GetSingleNumberGrid());

            Assert.AreEqual(25, result.Count);
        }