using System; using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.AssemblyTool.Data; using Ringtoets.Integration.IO.Assembly; namespace Ringtoets.Integration.IO.Test.Assembly { [TestFixture] public class ExportableCombinedSectionAssemblyResultTest { [Test] public void Constructor_CombinedSectionAssemblyNull_ThrowsArgumentNullException() { // Setup var random = new Random(21); var code = random.NextEnumValue(); // Call TestDelegate call = () => new ExportableCombinedSectionAssemblyResult(null, code); // Assert var exception = Assert.Throws(call); Assert.AreEqual("combinedSectionAssembly", exception.ParamName); } [Test] public void Constructor_ExpectedValues() { // Setup var random = new Random(21); var code = random.NextEnumValue(); ExportableFailureMechanismAssemblyResult combinedSectionAssembly = CreateFailureMechanismAssemblyResult(); // Call var assemblyResult = new ExportableCombinedSectionAssemblyResult(combinedSectionAssembly, code); // Assert Assert.AreSame(combinedSectionAssembly, assemblyResult.CombinedSectionAssembly); Assert.AreEqual(code, assemblyResult.Code); } private static ExportableFailureMechanismAssemblyResult CreateFailureMechanismAssemblyResult() { var random = new Random(21); return new ExportableFailureMechanismAssemblyResult(random.NextEnumValue(), random.NextEnumValue()); } } }