public ModuleDefinition GetModuleDefinitionFromContent( ModuleDescriptor moduleDescriptor, ModuleRepository moduleRepository) { if (m_nameResolutionSemantics == NameResolutionSemantics.ImplicitProjectReferences && moduleDescriptor.Name != PreludeName) { var moduleConfigurationPath = moduleRepository.RootDir.Combine(moduleRepository.PathTable, Names.ModuleConfigBm); return(ModuleDefinition.CreateModuleDefinitionWithImplicitReferences( moduleDescriptor, moduleRepository.RootDir, moduleConfigurationPath, moduleRepository.GetAllPathsForModule(moduleDescriptor), allowedModuleDependencies: null, cyclicalFriendModules: moduleRepository.GetAllModules().Select( descriptor => ModuleReferenceWithProvenance.FromNameAndPath(descriptor.Name, moduleConfigurationPath.ToString(PathTable))), mounts: null)); } return(ModuleDefinition.CreateModuleDefinitionWithExplicitReferencesWithEmptyQualifierSpace( moduleDescriptor, moduleRepository.RootDir.Combine(moduleRepository.PathTable, "FakeMainFile.dsc"), moduleRepository.RootDir.Combine(moduleRepository.PathTable, Names.ModuleConfigBm), moduleRepository.GetAllPathsForModule(moduleDescriptor), PathTable)); }
public void GetAllModules_ShouldInclude_BeheersingsNiveaus() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules().First(); // Assert Assert.IsTrue(result.Competenties.Any(competentie => competentie.BeheersingsNiveau.Niveau.Equals(1))); }
public void GetAllModules_Should_Include_Competenties() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules().First(); // Assert Assert.IsNotNull(result.Competenties); }
public void GetAllModules_Should_Be_Retrieved_From_Database(string moduleCode) { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules(); // Assert Assert.IsTrue(result.Any(module => module.ModuleCode.Equals(moduleCode))); }
public void GetAllModules_Should_Return_Typeof_IList_Of_Modules() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules(); // Assert Assert.IsInstanceOfType(result, typeof(IList <Module>)); }
public void GetAllModules_Should_Include_AuditLogEntries() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules().First(); // Assert Assert.IsTrue(result.AuditLogEntries.Any(entry => entry.Omschrijving == "Henk creeerde dit")); }
public void GetAllModules_Should_Include_Cohort() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules().First(); // Assert Assert.AreEqual("2018-2019", result.Cohort.CohortNaam); }
public void GetAllModules_Should_Include_Eindeisen() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules().First(); // Assert Assert.IsTrue(result.Eindeisen.Any(eindeis => eindeis.EindeisBeschrijving.Equals("Deze module is erg moeilijk."))); }
private SimpleSourceResolverSettings CreateResolverSettingsFromModulesWithContent( ModuleRepository moduleRepository, IFileSystem fileSystem) { var moduleDefinitions = new Dictionary <ModuleDescriptor, ModuleDefinition>(); foreach (var moduleName in moduleRepository.GetAllModules()) { moduleDefinitions[moduleName] = GetModuleDefinitionFromContent(moduleName, moduleRepository); } return(new SimpleSourceResolverSettings(moduleDefinitions, fileSystem)); }
public void GetAllModules_Should_Include_ArchitectuurLagen() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules().First(); // Assert Assert.IsTrue(result.Competenties.Any(competentie => competentie.BeheersingsNiveau.ArchitectuurLaag.ArchitectuurLaagNaam.Equals("gebruikersinteractie"))); }
public void GetAllModules_Should_Include_Perioden() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules().First(); // Assert Assert.IsTrue(result.Studiefasen.Any(studiefase => studiefase.Periode.PeriodeNummer == 1)); }
public void GetAllModules_Should_Include_Specialisaties() { // Arrange var context = new CompetentieAppFrontendContext(_options); var repository = new ModuleRepository(context); // Act var result = repository.GetAllModules().First(); // Assert Assert.IsTrue(result.Studiefasen.Any(studiefase => studiefase.Specialisatie.Naam.Equals("Propedeuse"))); }