示例#1
0
        public List <string> Get(int id)
        {
            List <PBScrape> allScrapes    = PBScrape.GetAll();
            PBScrape        currentScrape = allScrapes[id - 1];
            List <string>   allProperties = new List <string>();

            allProperties.Add(currentScrape.GetId().ToString());
            allProperties.Add(currentScrape.GetKeyword());
            allProperties.Add(currentScrape.GetUrl());
            allProperties.Add(currentScrape.GetPhone());
            allProperties.Add(currentScrape.GetEmail());
            return(allProperties);
        }
        public void PBScrape_SavesStaticVariables_IsTrue()
        {
            PBScrape newScrape = new PBScrape();

            newScrape.Save();
            int    Id       = newScrape.GetId();
            string Keyword  = newScrape.GetKeyword();
            string Url      = newScrape.GetUrl();
            string Phone    = newScrape.GetPhone();
            string Email    = newScrape.GetEmail();
            bool   TestBool = false;

            if (Id == 0 && Keyword == "Bongos" && Url == "https://Bongos.com" && Phone == "333-333-3333" && Email == "*****@*****.**")
            {
                TestBool = true;
            }
            Assert.AreEqual(TestBool, true);
        }