Exemplo n.º 1
0
        //This method tests the getRestrictions method
        public void Test1()
        {
            SettingsStorageImp st = new SettingsStorageImp();

            Console.WriteLine("[] Trying to get the constraints of the task : \"e4a55914-0847-4d70-be22-d2ecac77cdfa\"");
            Constraints constraints = st.getRestrictions("e4a55914-0847-4d70-be22-d2ecac77cdfa");

            Console.WriteLine("The constraints of the task are: ");
            Console.WriteLine("AllowedDepth          : " + constraints.getAllowedDepth());
            Console.WriteLine("RestrictionList       : ");
            foreach (String restrict in constraints.getRestrictionList())
            {
                Console.Write(restrict + " ");
            }
            Console.WriteLine("");
            Console.WriteLine("CrawlList             : ");
            foreach (String crawl in constraints.getCrawlList())
            {
                Console.Write(crawl + " ");
            }
            Console.WriteLine("");
            Console.WriteLine("Allow parametrezation : " + constraints.isParametrizationAllowed());
            Console.WriteLine("=============================================================");
            if (constraints == null)
            {
                Console.WriteLine("Test Not Found !!");
            }
            Console.WriteLine(" - PASSED -");
            Console.WriteLine("=============================================================");
        }
Exemplo n.º 2
0
        //This method tests the getRestrictions method
        public void Test1()
        {
            SettingsStorageImp st = new SettingsStorageImp();

            Console.WriteLine("[] Trying to get the constraints of the task : \"e4a55914-0847-4d70-be22-d2ecac77cdfa\"");
            Constraints constraints = st.getRestrictions("e4a55914-0847-4d70-be22-d2ecac77cdfa");
            Console.WriteLine("The constraints of the task are: ");
            Console.WriteLine("AllowedDepth          : " + constraints.getAllowedDepth());
            Console.WriteLine("RestrictionList       : ");
            foreach (String restrict in constraints.getRestrictionList())
            {
                Console.Write(restrict + " ");
            }
            Console.WriteLine("");
            Console.WriteLine("CrawlList             : ");
            foreach (String crawl in constraints.getCrawlList())
            {
                Console.Write(crawl + " " );
            }
            Console.WriteLine("");
            Console.WriteLine("Allow parametrezation : " + constraints.isParametrizationAllowed());
            Console.WriteLine("=============================================================");
            if (constraints==null)
                Console.WriteLine("Test Not Found !!");
            Console.WriteLine(" - PASSED -");
            Console.WriteLine("=============================================================");
        }
Exemplo n.º 3
0
        //This method tests all the methods when the data searched does not exist in the data base
        public void Test5()
        {
            SettingsStorageImp st = new SettingsStorageImp();

            //testing the method getRestrictions
            Console.WriteLine("[] Trying to get the constraints of a task that does not exist");
            Constraints constraints = st.getRestrictions("e4a55914-0847-4d70-be22-d2ecac7c9dfa");

            if (constraints == null)
            {
                Console.WriteLine(" - PASSED -");
            }

            //testing the method getSeedList
            Console.WriteLine("[] Trying to get the seeds of a task that does not exist");
            List <String> seeds = st.getSeedList("e4a55914-0847-4d70-be22-d2ecac7c9dfa");

            if (seeds.Count == 0)
            {
                Console.WriteLine(" - PASSED -");
            }
        }
Exemplo n.º 4
0
 /**
  * gets all the restrictions which was attached to the given task.
  */
 public Constraints getRestrictions(String taskId)
 {
     return(_settingsStorageImp.getRestrictions(taskId));
 }
Exemplo n.º 5
0
        //This method tests all the methods when the data searched does not exist in the data base
        public void Test5()
        {
            SettingsStorageImp st = new SettingsStorageImp();
            //testing the method getRestrictions
            Console.WriteLine("[] Trying to get the constraints of a task that does not exist");
            Constraints constraints = st.getRestrictions("e4a55914-0847-4d70-be22-d2ecac7c9dfa");

            if (constraints==null)
                Console.WriteLine(" - PASSED -");

            //testing the method getSeedList
            Console.WriteLine("[] Trying to get the seeds of a task that does not exist");
            List<String> seeds = st.getSeedList("e4a55914-0847-4d70-be22-d2ecac7c9dfa");

            if (seeds.Count == 0)
                Console.WriteLine(" - PASSED -");
        }