using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Foundations.UnitTests { public class FauxSimulationState : ISimulationState { public int Integer; public bool CrashOnSerialize; public void CopyFrom(FauxSimulationState other) { Integer = other.Integer; CrashOnSerialize = other.CrashOnSerialize; } public string Serialize() { if (CrashOnSerialize) { throw new InvalidOperationException("Foo"); } return Integer.ToString(); } public void Deserialize(string serializedFormat) { Integer = int.Parse(serializedFormat); } } }