public void ReadFailureMechanismValues_FailureMechanismNull_ThrowsArgumentNullException() { // Setup var entity = new PipingFailureMechanismMetaEntity(); // Call void Call() => entity.ReadFailureMechanismValues(null); // Assert var exception = Assert.Throws <ArgumentNullException>(Call); Assert.AreEqual("failureMechanism", exception.ParamName); }
public void ReadFailureMechanismValues_ValidParameters_SetPipingProbabilityAssessmentInputProperties() { // Setup var random = new Random(31); var configurationType = random.NextEnumValue <PipingScenarioConfigurationType>(); var failureMechanismToUpdate = new PipingFailureMechanism(); var entity = new PipingFailureMechanismMetaEntity { PipingScenarioConfigurationType = Convert.ToByte(configurationType) }; // Call entity.ReadFailureMechanismValues(failureMechanismToUpdate); // Assert Assert.AreEqual(configurationType, failureMechanismToUpdate.ScenarioConfigurationType); }