Пример #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);
        }