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;
        }
Esempio n. 2
0
 async Task TestEniroToSeeIfPredetermendIdReturnsCorrectNameToAsync()
 {
     var testVar = new ClassScrapeEniro();
     string testResult = "Från Eniro.se Mattias Asplund AB";
     Assert.AreEqual(testResult, (await testVar.findNameByOrgIDAsync(testId)).TrimEnd());
 }