using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Deltares.DamEngine.Io; using Deltares.DamEngine.Io.XmlInput; using Deltares.DamEngine.Io.XmlOutput; using Input = Deltares.DamEngine.Io.XmlInput.Input; using InputDamProjectType = Deltares.DamEngine.Io.XmlInput.InputDamProjectType; using NUnit.Framework; namespace Deltares.DamEngine.Io.Tests { [TestFixture] public class XmlSerializationTests { [Test, Ignore("To be finalized")] public void CanReadWriteInputObject() { const string filename = "Input.xml"; Input sourceInput = CreatePopulatedInput(); XmlSerialization.SaveInputAsXml(filename, sourceInput); Input destinationInput = XmlSerialization.LoadInputFromXml(filename); CompareInput(sourceInput, destinationInput); } private Input CreatePopulatedInput() { Input input = new Input(); input.DamProjectType = InputDamProjectType.Design; return input; } private void CompareInput(Input expected, Input actual) { Assert.AreEqual(expected.DamProjectType, actual.DamProjectType); } } }