Example #1
0
        public void TestAllaBolagToSeeIfPredetermendIdReturnsCorrectName()
        {
            var testVar = new ClassScrapeAllaBolag();
           string testResult = "Från Allabolag.se Mattias Asplund Aktiebolag";
            Assert.AreEqual(testResult, testVar.findNameByOrgID(testId));

        }
Example #2
0
        async Task TestAllaBolagToSeeIfPredetermendIdReturnsCorrectNameToAsync()
        {
            var testVar = new ClassScrapeAllaBolag();
            string testResult = "Från Allabolag.se Mattias Asplund Aktiebolag";
            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;
        }