public void Read_GeneralInputNull_ThrowsArgumentNullException() { // Setup var entity = new WaveImpactAsphaltCoverFailureMechanismMetaEntity(); // Call void Call() => entity.Read(null); // Assert var exception = Assert.Throws <ArgumentNullException>(Call); Assert.AreEqual("generalInput", exception.ParamName); }
public void Read_WithAllData_SetsGeneralInputProperties() { // Setup var random = new Random(); var entity = new WaveImpactAsphaltCoverFailureMechanismMetaEntity { DeltaL = random.NextDouble(1, 2000), ApplyLengthEffectInSection = Convert.ToByte(random.NextBoolean()) }; var generalInput = new GeneralWaveImpactAsphaltCoverInput(); // Call entity.Read(generalInput); // Assert Assert.AreEqual(entity.DeltaL, generalInput.DeltaL, generalInput.DeltaL.GetAccuracy()); Assert.AreEqual(Convert.ToBoolean(entity.ApplyLengthEffectInSection), generalInput.ApplyLengthEffectInSection); }