The following test throws when run in low trust appdomain:
var quantity = Quantity.Create(10.5, "mg/l");
Assert.That(quantity, Is.Not.Null);
Assert.That(quantity.UnitSymbol, Is.EqualTo("mg/l"));
Assert.That(quantity.Magnitude, Is.EqualTo(10.5)); // throws SerializationException
System.Runtime.Serialization.SerializationException : Type 'NUnit.Framework.Constraints.Tolerance' in Assembly 'nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' is not marked as serializable.
The following test throws when run in low trust appdomain:
System.Runtime.Serialization.SerializationException : Type 'NUnit.Framework.Constraints.Tolerance' in Assembly 'nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb' is not marked as serializable.