Exemplo n.º 1
0
        public void Sort_Empty()
        {
            bool          test         = true;
            List <double> testArray    = new List <double> {
            };
            DataLine <double> dataLine = new DataLine <double>(string.Join(" ", testArray));

            testArray.Sort();
            string[] sortedArray = dataLine.Get_Sorted_Data();
            for (int i = 0; i < sortedArray.Length; i++)
            {
                if (testArray[i].ToString() == sortedArray[i])
                {
                    continue;
                }
                test = false;
            }
            Assert.IsTrue(test);
        }
Exemplo n.º 2
0
        public void Sort_Strings()
        {
            bool          test      = true;
            List <string> testArray = new List <string> {
                "Test", "Tiring", "A"
            };
            DataLine <string> dataLine = new DataLine <string>(string.Join(" ", testArray));

            testArray.Sort();
            string[] sortedArray = dataLine.Get_Sorted_Data();
            for (int i = 0; i < sortedArray.Length; i++)
            {
                if (testArray[i] == sortedArray[i])
                {
                    continue;
                }
                test = false;
            }
            Assert.IsTrue(test);
        }