public void TestGetFrameworksFromZipFile() { var zipFIleExtractor = new ZipFileExtractor(); var csvService = new CsvService(null); var applicationSettings = new AppServiceSettings(); LarsDataService larsDataService = new LarsDataService(applicationSettings, csvService, new HttpService(null), zipFIleExtractor, new AngleSharpService(), null, new HttpService(null)); var path = larsDataService.GetListOfCurrentFrameworks(); Assert.IsTrue(path.Count > 100); }
public void ShouldGetFrameworks() { _mockLogger.Setup(x => x.Info(It.IsAny <object>())).Callback <object>(Console.WriteLine); _appServiceSettings.Setup(x => x.ImServiceBaseUrl).Returns("https://hub.imservices.org.uk"); _appServiceSettings.Setup(x => x.ImServiceUrl).Returns("Learning%20Aims/Downloads/Pages/default.aspx"); _appServiceSettings.Setup(x => x.CsvFileNameFrameworks).Returns("CSV/Framework.csv"); _appServiceSettings.Setup(x => x.CsvFileNameFrameworksAim).Returns("CSV/FrameworkAims.csv"); _appServiceSettings.Setup(x => x.CsvFileNameFrameworkComponentType).Returns("CSV/FrameworkComponentType.csv"); _appServiceSettings.Setup(x => x.CsvFileNameLearningDelivery).Returns("CSV/LearningDelivery.csv"); var frameworks = _sut.GetListOfCurrentFrameworks(); frameworks.Should().NotBeNull(); frameworks.Should().NotBeEmpty(); }
public void ShouldPopulateFrameworkWithCompetenceQualifications() { // Act var frameworks = _sut.GetListOfCurrentFrameworks(); // Assert frameworks.Count().Should().Be(1); var framework = frameworks.First(); framework.CompetencyQualification.Count().Should().Be(1); framework.KnowledgeQualification.Should().BeEmpty(); framework.CombinedQualification.Should().BeEmpty(); var qualification = framework.CompetencyQualification.First(); qualification.Should().Be(_learningDelivery.LearnAimRefTitle); }