DefaultFloatingPointToleranceAttribute public class DefaultFloatingPointToleranceAttribute : NUnitAttribute, IApplyToContext Sets the tolerance used by default when checking the equality of floating point values within the test assembly, fixture or method. Documentation Code using NUnit.Framework.Constraints; using NUnit.Framework.Interfaces; using NUnit.Framework.Internal; using System; using System.Runtime.CompilerServices; namespace NUnit.Framework { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class DefaultFloatingPointToleranceAttribute : NUnitAttribute, IApplyToContext { [Nullable(1)] private readonly Tolerance _tolerance; public DefaultFloatingPointToleranceAttribute(double amount) { _tolerance = new Tolerance(amount); } [NullableContext(1)] public void ApplyToContext(TestExecutionContext context) { context.DefaultFloatingPointTolerance = _tolerance; } } }