public void ReadByGeoFilter_ReadWithNoShapeInBoundsAndFlagSetToTrue_ShouldReturnEmptyEnumerable()
        {
            Envelope boundsWithWholeTriangle = new Envelope(-1.17459, -1.00231, -1.09803, -1.5);

            // Arrange.
            m_TempFiles = new TempFileCloudUploader[]
            {
                new TempFileCloudUploader("test.shp", ShpFiles.Read("UnifiedChecksMaterial")),
                new TempFileCloudUploader("test.dbf", DbfFiles.Read("UnifiedChecksMaterial")),
            };

            m_shapeDataReader = new ShapeDataReader(new ShapefileStreamProviderRegistry(GetProvider(m_TempFiles[0].Path), GetProvider(m_TempFiles[1].Path)));

            // Act.
            IEnumerable <IShapefileFeature> results = m_shapeDataReader.ReadByMBRFilter(boundsWithWholeTriangle, true);

            // Assert.
            Assert.IsNotNull(results);
            Assert.IsFalse(results.Any());
        }
        public void ReadEntry_ReadEntryValues_ShoudReturnCorrectValues()
        {
            // Arrange
            m_TmpFile = new TempFileCloudUploader("data.dbf", DbfFiles.Read("point_ed50_geo"));
            m_Reader  = new DbaseReader(GetProvider(m_TmpFile.Path));

            var expectedTable = new
            {
                Ids = new double[]
                {
                    3, 2, 1
                },
                Strings = new[]
                {
                    "str3", "str2", "str1"
                },
                WholeNums = new double[]
                {
                    3, 2, 1
                },
                DecNums = new double[]
                {
                    3, 2, 1
                }
            };

            // Act.
            IAttributesTable[] results =
            {
                m_Reader.ReadEntry(0),
                m_Reader.ReadEntry(1),
                m_Reader.ReadEntry(2)
            };

            // Assert.
            var currResIndex = 0;

            foreach (var res in results)
            {
                var id       = res["id"];
                var str      = res["str"];
                var wholeNum = res["wholeNum"];
                var decNum   = res["decNum"];
                var date     = res["dt"];

                Assert.IsNotNull(id);
                Assert.IsNotNull(str);
                Assert.IsNotNull(wholeNum);
                Assert.IsNotNull(decNum);
                Assert.IsNotNull(date);

                Assert.IsInstanceOf <double>(id);
                Assert.IsInstanceOf <string>(str);
                Assert.IsInstanceOf <double>(wholeNum);
                Assert.IsInstanceOf <double>(decNum);
                Assert.IsInstanceOf <DateTime>(date);

                Assert.AreEqual(id, expectedTable.Ids[currResIndex]);
                Assert.AreEqual(str, expectedTable.Strings[currResIndex]);
                Assert.AreEqual(wholeNum, expectedTable.WholeNums[currResIndex]);
                Assert.AreEqual(decNum, expectedTable.DecNums[currResIndex]);
                Assert.AreEqual(date, DATE_SAVED_IN_DBF);

                currResIndex++;
            }
        }