Пример #1
0
        public void Update_ManagementProperties()
        {
            // Arrange
            IManagementPropertiesDataMapper dataMapper = new ManagementPropertiesJsonDataMapper(_managementPropertiesPath);
            ManagementProperties            properties = new ManagementProperties
            {
                OlcPrice = 150,
                PeriodAfterLastCourseEmployableInDays = 2,
                PeriodBeforeStartNotifiable           = 4,
                PeriodEducationPlanInDays             = 100,
                Footer = "new footer"
            };

            // Act
            dataMapper.Update(properties);

            // Assert
            var propertiesResult = dataMapper.FindManagementProperties();

            Assert.AreEqual(150, propertiesResult.OlcPrice);
            Assert.AreEqual(2, propertiesResult.PeriodAfterLastCourseEmployableInDays);
            Assert.AreEqual(4, propertiesResult.PeriodBeforeStartNotifiable);
            Assert.AreEqual(100, propertiesResult.PeriodEducationPlanInDays);
            Assert.AreEqual("new footer", propertiesResult.Footer);
        }
Пример #2
0
        public void FindManagementProperties_WithNotExistingPath_ManagementProperties_ExceptionThrowed()
        {
            // Arrange
            IManagementPropertiesDataMapper dataMapper = new ManagementPropertiesJsonDataMapper("noPath");

            // Act
            var result = dataMapper.FindManagementProperties();

            // Assert FileNotFoundException
        }
Пример #3
0
        public void FindManagementProperties_WithCorruptedFile_ManagementProperties_ExceptionThrowed()
        {
            // Arrange
            IManagementPropertiesDataMapper dataMapper = new ManagementPropertiesJsonDataMapper("../../Data/corrupted.json");

            // Act
            var result = dataMapper.FindManagementProperties();

            // Assert JsonSerializationException
        }
Пример #4
0
        public void FindManagementProperties_ManagementProperties()
        {
            // Arrange
            IManagementPropertiesDataMapper dataMapper = new ManagementPropertiesJsonDataMapper(_managementPropertiesPath);

            // Act
            var result = dataMapper.FindManagementProperties();

            // Assert
            Assert.AreEqual(125, result.OlcPrice);
            Assert.AreEqual(7, result.PeriodAfterLastCourseEmployableInDays);
            Assert.AreEqual(7, result.PeriodBeforeStartNotifiable);
            Assert.AreEqual(90, result.PeriodEducationPlanInDays);
            Assert.AreEqual("Conform de arbeidsvoorwaarden die van toepassing zijn op de arbeidsovereenkomst tussen <Naam> en Info Support is de studiekostenregeling bijlage 6 van toepassing. Concreet betekent dit dat iedere genoten opleiding in 36 maanden wordt afgeschreven ingaande de einddatum van de  opleiding.", result.Footer);
        }