Ejemplo n.º 1
0
        public void TestGetValues()
        {
            // Arrange
            SetupCsvFile();
            // Act
            var values = _testee.GetValues(_uploadedFile.Object.FileName, BusinessLayerTestHelper.GetDimensionOrMeasureDtos(), ";", "dd.MM.yyyy");

            // Assert
            values.Rows.Count.ShouldBeEquivalentTo(9);
            values.Columns.Count.ShouldBeEquivalentTo(5);
            values.Rows[0]["Place"].ShouldBeEquivalentTo("Czech_republic");
            values.Rows[0]["Region"].ShouldBeEquivalentTo("Europe");
            values.Rows[0]["Product"].ShouldBeEquivalentTo("Bread");
            values.Rows[0]["Category"].ShouldBeEquivalentTo("Bakery");
            values.Rows[0]["Units"].ShouldBeEquivalentTo("20");

            values.Rows[8]["Place"].ShouldBeEquivalentTo("Russia");
            values.Rows[8]["Region"].ShouldBeEquivalentTo("Asia");
            values.Rows[8]["Product"].ShouldBeEquivalentTo("Milk");
            values.Rows[8]["Category"].ShouldBeEquivalentTo("Dairy");
            values.Rows[8]["Units"].ShouldBeEquivalentTo("35");
        }