title: C# Fluent Assertions global options for ShouldBeEquivalentTo
body: <p>In Fluent Assertions when comparing objects with DateTime properties there are sometimes a slight mismatch in the milliseconds and the comparison fail. The way we get around it is to set the comparison option like so:</p>
  
  <pre><code>actual.ShouldBeEquivalentTo(expected,
          options =&gt;
              options.Using&lt;DateTime&gt;(ctx =&gt; ctx.Subject.Should().BeCloseTo(ctx.Expectation))
                  .WhenTypeIs&lt;DateTime&gt;());
  </code></pre>
  
  <p>Is there a way to set this up once and have it always apply instead of having to specify it every time we call ShouldBeEquivalentTo?</p>
  
  <p>Update1:
  Tried the following approach but it doesn't seem to work, test fails on 1 millisecond difference. The new default does not seem to get called by the factory.</p>
  
  <pre><code>using System;
  using FluentAssertions;
  using FluentAssertions.Equivalency;
  using Microsoft.VisualStudio.TestTools.UnitTesting;
  
  namespace UnitTestProject1
  {
      class Test
      {
          public DateTime TestDateTime { get; set; }
      }
  
      [TestClass]
      public class UnitTest1
      {
          [TestMethod]
          public void SettingFluentAssertionDefault()
          {
              // arrange
              var defaultAssertionOptions = EquivalencyAssertionOptions&lt;DateTime&gt;.Default;
  
              EquivalencyAssertionOptions&lt;DateTime&gt;.Default = () =&gt;
              {
                  var config = defaultAssertionOptions();
                  config.Using&lt;DateTime&gt;(ctx =&gt; ctx.Subject.Should().BeCloseTo(ctx.Expectation)).WhenTypeIs&lt;DateTime&gt;();
                  return config;
              };
  
              var testDateTime = DateTime.Now;
              var expected = new Test {TestDateTime = testDateTime};
  
              // act
              var actual = new Test {TestDateTime = testDateTime.AddMilliseconds(1)};
  
              // assert
              actual.ShouldBeEquivalentTo(expected);
          }
      }
  }
  </code></pre>