title: Fluent Assertions: Using BeCloseTo on a collection of DateTime properties
body: <p>I'm processing a number of items, each of which contain a DateProcessed property (a nullable DateTime) and want to Assert that the property is set to the current date.  By the time it gets through the processing routine the dates are all slightly different.</p>
  
  <p>I want to Test that all the DateProcessed properties have a relativity (100ms) recent DateTime.</p>
  
  <p>Fluent Assertions has the .BeCloseTo method which works perfectly for a single item.  But I want to use that for the entire collection.  But it's not available via the Contains() when looking at a collection.</p>
  
  <p>A simplified example ...</p>
  
  <pre><code>[TestFixture]
  public class when_I_process_the_items
  {
      [SetUp]
      public void context()
      {
          items = new List&lt;DateTime?&gt;(new [] { (DateTime?)DateTime.Now, DateTime.Now, DateTime.Now } );
      }
  
      public List&lt;DateTime?&gt; items;
  
      [Test]
      public void then_first_item_must_be_set_to_the_current_time()
      {
          items.First().Should().BeCloseTo(DateTime.Now, precision: 100);
      }
  
      [Test]
      public void then_all_items_must_be_set_to_the_current_time()
      {
          items.Should().Contain .... //Not sure? :(
      }
  
  }
  </code></pre>