Esempio n. 1
0
        public void Read_ScenarioConfigurationsPerFailureMechanismSectionNull_ThrowsArgumentNullException()
        {
            // Setup
            var entity = new PipingScenarioConfigurationPerFailureMechanismSectionEntity();

            // Call
            TestDelegate call = () => entity.Read(null);

            // Assert
            string paramName = Assert.Throws <ArgumentNullException>(call).ParamName;

            Assert.AreEqual("scenarioConfigurationsPerFailureMechanismSection", paramName);
        }
Esempio n. 2
0
        public void Read_ParameterValues_SectionResultWithParameterValues()
        {
            // Setup
            var random            = new Random(21);
            var configurationType = random.NextEnumValue <PipingScenarioConfigurationPerFailureMechanismSectionType>();

            var entity = new PipingScenarioConfigurationPerFailureMechanismSectionEntity
            {
                PipingScenarioConfigurationPerFailureMechanismSectionType = Convert.ToByte(configurationType)
            };

            var configurationPerSection =
                new PipingScenarioConfigurationPerFailureMechanismSection(FailureMechanismSectionTestFactory.CreateFailureMechanismSection());

            // Call
            entity.Read(configurationPerSection);

            // Assert
            Assert.AreEqual(configurationType, configurationPerSection.ScenarioConfigurationType);
        }