Exemple #1
0
        public void TestDisplay()
        {
            NamesDo names = new NamesDo();
            names.Ids.Add( "00000000000000085967_00000001220429793929_03490");
            names.Group = "OWNER";
            names.LoadData();

            Console.WriteLine("GetNamesInDateOrderById");
            foreach( var name in names.GetNamesInDateOrderById("00000000000000085967_00000001220429793929_03490"))
                //Console.WriteLine(name.FullName);
                Console.WriteLine();

            Console.WriteLine("GetBestName");
             var name2 = names.GetBestName("00000000000000085967_00000001220429793929_03490");
                Console.WriteLine(name2.FullName);

            names.GetUniqueNamesById();
        }
Exemple #2
0
        public void testGetGroup()
        {
            List<string> returnVal;
            Name name;
            string message;
            NamesDo names = new NamesDo();

            message = "TEST GET ALL";
            names.GetAll = true;
            names.LoadData();
            ReviewTestData(names.NamesList(), message);
            var datapair = names.GetPairedNameAndId();
            names.ReSet();

            message = "TEST GET BY ID";
            names.Ids.Add("00000000000000085967_00000001220429793929_03490");
            names.LoadData();
            ReviewTestData(names.NamesList(), message);
            names.ReSet();

            message = "TEST GET BY SPECIFIC GROUP";
            names.GetAll = true;
            names.Group = "OWNER";
            names.LoadData();
            ReviewTestData(names.NamesList(), message);
            names.ReSet();

            message = "TEST GET UNIQUE GROUPS";
            names.GetAll = true;
            names.LoadData();
            names.GetUniqueGroups();
            ReviewTestData(names.NamesList(), message);
            names.ReSet();

            message = "TEST BEST NAME";
            names.GetAll = true;
            names.LoadData();
            name = names.GetBestName("00000000000000085967_00000001220429793929_03490");
            ReviewTestData(names.NamesList(name),message);
            names.ReSet();

            names.GetAll = true;
            names.LoadData();
            var UniqueGroups = names.GetUniqueGroups();
        }