Example #1
0
        public async Task GetLatestTest(FieldOfStudy fos, LearningOutcomeDocument input, LearningOutcomeDocument expectedOutcome)
        {
            // Arrange
            var dbContext = SyllabusTestRepository.GetInMemorySyllabusContext();

            dbContext.FieldsOfStudies.Add(fos);
            if (input != null)
            {
                dbContext.LearningOutcomeDocuments.Add(input);
            }
            dbContext.SaveChanges();

            var manager = new LearningOutcomeService(dbContext, null, null);

            // Act
            var actualResult = await manager.Latest("TEST001", "2020/2021");

            // Assert
            Assert.Equal(expectedOutcome.Id, actualResult.Id);
            Assert.Equal(expectedOutcome.Version, actualResult.Version);
            Assert.Equal(expectedOutcome.AcademicYear, actualResult.AcademicYear);
            Assert.Equal(expectedOutcome.FieldOfStudy.Code, actualResult.FieldOfStudy.Code);
            Assert.Equal(expectedOutcome.LearningOutcomes.Count, actualResult.LearningOutcomes.Count);
            Assert.Equal(expectedOutcome.IsDeleted, actualResult.IsDeleted);
        }
Example #2
0
        public void Create(LearningOutcomeDocument lod)
        {
            FieldOfStudy           fieldOfStudy     = lod.FieldOfStudy;
            List <LearningOutcome> learningOutcomes = lod.LearningOutcomes;

            using (Document doc = PdfHelper.Document(true))
            {
                learningOutcomeTitle(lod, doc);

                if (fieldOfStudy != null)
                {
                    fieldOfStudyInfo(fieldOfStudy, doc);
                }


                if (learningOutcomes != null)
                {
                    addLearningOutcomes(learningOutcomes, doc);
                }
            }
            PdfHelper.AddPages();
        }
Example #3
0
 private static void learningOutcomeTitle(LearningOutcomeDocument lod, Document doc)
 {
     doc.Add(new Paragraph("ZAKŁADANE EFEKTY UCZENIA SIĘ").SetFontSize(20));
     doc.Add(new Paragraph($"Rok akademicki: {lod.AcademicYear}"));
 }