Esempio n. 1
0
        public void TestHittaToSeeIfPredetermendIdReturnsCorrectName()
        {
            var testVar = new ClassScrapeHitta();
           string testResult = "Från Hitta.se Asplund Software";
            Assert.AreEqual(testResult, testVar.findNameByOrgID(testId));

        }
Esempio n. 2
0
        async Task TestHittaToSeeIfPredetermendIdReturnsCorrectNameToAsync()
        {
            var testVar = new ClassScrapeHitta();
            string testResult = "Från Hitta.se Asplund Software";
            Assert.AreEqual(testResult, (await testVar.findNameByOrgIDAsync(testId)));

        }
        public static IScrapeService CreateScrapeService(string type)
        {
            IScrapeService service = null;
            switch (type)
            {
                case "Hitta.se":
                    service = new ClassScrapeHitta();
                    break;
                case "Allabolag.se":
                    service = new ClassScrapeAllaBolag();
                    break;
                case "Eniro.se":
                    service = new ClassScrapeEniro();
                    break;
                case "Upplysning.se":
                    service = new ClassScrapeUpplysning();
                    break;

            }

            return service;
        }