示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
        }