Exemplo n.º 1
0
        public void IsLeftLabel_EdgeColumn_NoError()
        {
            //Arrange
            string[,] table =
            {
                { "prop", "val" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 0, table);

            //Act
            bool success = csvAddress.IsLeftLabel();

            //Assert
            Assert.IsTrue(true);
        }
Exemplo n.º 2
0
        public void IsStandAlone_EdgeColumn_NoError()
        {
            //Arrange
            string[,] table =
            {
                { "SomeData" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 0, table);

            //Act
            bool success = csvAddress.IsStandAlone();;

            //Assert
            Assert.IsTrue(success);
        }
Exemplo n.º 3
0
        public void IsStandAlone_True_NoLabelContained()
        {
            //Arrange
            string[,] table =
            {
                { "SomeLabel" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 0, table);
            bool       expected   = true;

            //Act
            bool actual = csvAddress.IsStandAlone();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 4
0
        public void IsLeftLabel_False_NoValue()
        {
            //Arrange
            string[,] table =
            {
                { "", "prop", "" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 1, table);
            bool       expected   = false;

            //Act
            bool actual = csvAddress.IsLeftLabel();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 5
0
        public void IsValid_False_ColumnOutsideReport()
        {
            //Arrange
            string[,] table =
            {
                { "" }
            };
            CSVAddress csvAddress = new CSVAddress(0, -1, table);
            bool       expected   = false;

            //Act
            bool actual = csvAddress.IsValid();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 6
0
        public void IsLeftLabel_True_ValueRight()
        {
            //Arrange
            string[,] table =
            {
                { "prop", "val" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 0, table);
            bool       expected   = true;

            //Act
            bool actual = csvAddress.IsLeftLabel();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 7
0
        public void IsValid_True_ColumnInReport()
        {
            //Arrange
            string[,] table =
            {
                { "" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 0, table);
            bool       expected   = true;

            //Act
            bool actual = csvAddress.IsValid();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 8
0
        public void IsStandAlone_False_ValueRight()
        {
            //Arrange
            string[,] table =
            {
                { "prop", "val" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 0, table);
            bool       expected   = false;

            //Act
            bool actual = csvAddress.IsStandAlone();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 9
0
        public void IsTopLabel_True_LabelContained()
        {
            //Arrange
            string[,] table =
            {
                { "prop"         },
                { "SomeProp:val" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 0, table);
            bool       expected   = true;

            //Act
            bool actual = csvAddress.IsTopLabel();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 10
0
        public void IsStandAlone_True_NoLabelLeft()
        {
            //Arrange
            string[,] table =
            {
                { "", "SomeData", "" }
            };
            ICSVAddress csvAddress = new CSVAddress(0, 1, table);

            bool expected = true;

            //Act
            bool actual = csvAddress.IsStandAlone();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 11
0
        public void IsStandAlone_True_NoValueBelow()
        {
            //Arrange
            string[,] table =
            {
                { ""         },
                { "SomeData" },
                { ""         }
            };
            CSVAddress csvAddress = new CSVAddress(1, 0, table);
            bool       expected   = true;

            //Act
            bool actual = csvAddress.IsStandAlone();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 12
0
        public void IsTopLabel_False_NoValue()
        {
            //Arrange
            string[,] table =
            {
                { ""    },
                { "val" },
                { ""    }
            };
            CSVAddress csvAddress = new CSVAddress(1, 0, table);
            bool       expected   = false;

            //Act
            bool actual = csvAddress.IsTopLabel();

            //Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 13
0
        public void IsTableHeader_False_DisobeysTableStandard()
        {
            //Arrange
            string[,] table =
            {
                { "",     "",      "",  "" },
                { "Prop", "Val",   "",  "" },
                { "0",    "",      "",  "" },
                { "ice",  "cream", "0", "" }
            };
            CSVAddress csvAddress = new CSVAddress(0, 0, table);
            bool       expected   = false;

            //Act
            bool actual = csvAddress.IsTableHeader();

            //Assert
            Assert.AreEqual(expected, actual);
        }