Exemplo n.º 1
0
        public void TestNameFormatter_Restore_Name_Invalid_Name()
        {
            string name         = "Invalid_Name";
            string expectedName = "Invalid_Name";

            string result = NameFormatter.restoreName(name);

            Assert.AreEqual(expectedName, result);
        }
Exemplo n.º 2
0
        public void TestNameFormatter_Restore_Name_Valid_Name_3_Given()
        {
            string name         = "Surname First_Name Second_Name Third_Name";
            string expectedName = "First_Name Second_Name Third_Name Surname";

            string result = NameFormatter.restoreName(name);

            Assert.AreEqual(expectedName, result);
        }
Exemplo n.º 3
0
        /**
         * Restore formatted names to original value
         *
         * @return Restored names as an array of strings
         */
        private string[] restoreNames(string[] formattedInput)
        {
            string[] restoredNames = new string[formattedInput.Length];

            for (int i = NameSorterDefs.ARRAY_BEGIN; i < formattedInput.Length; ++i)
            {
                restoredNames[i] = NameFormatter.restoreName(formattedInput[i]);
            }

            return(restoredNames);
        }