public void TestUpplysningToSeeIfPredetermendIdReturnsCorrectName() { var testVar = new ClassScrapeUpplysning(); string expected = "Från Upplysning.se Mattias Asplund Aktiebolag"; string actual = testVar.findNameByOrgID(testId); Assert.AreEqual(expected, actual); }
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; }
async Task TestUpplysningToSeeIfPredetermendIdReturnsCorrectNameToAsync() { var testVar = new ClassScrapeUpplysning(); string expected = "Från Upplysning.se Mattias Asplund Aktiebolag"; var actual = (await testVar.findNameByOrgIDAsync(testId)); Assert.AreEqual(expected, actual); }