title: Asp.net model date testing
body: <p>Say I have a model for a product:</p>
  
  <pre><code>public class Product
  {
      public int Id { get; set; }
      public string Name { get; set; }
      public DateTime Created { get; set; }
      ...
  }
  </code></pre>
  
  <p>For this product I have a Dto:</p>
  
  <pre><code>public class ProductDto
  {
      [Required]
      public string Name { get; set; }
      ...
  }
  </code></pre>
  
  <p>Now, In my controller, I have a method that "creates" new products and records the current time in the <code>Created</code> attribute:</p>
  
  <pre><code>public IHttpActionResult PostProduct(ProductDto dto)
  {
      return Ok(new Product()
      {
          Created = DateTime.Now,
          Name = dto.Name
      });
  }
  </code></pre>
  
  <p>Say I wanted to unit test this method to verify that a newly created product is assigned a <code>DateTime</code> object other than the default <code>{01-01-0001 00:00:00}</code> it gets from the prop snippet, how would I go about that? I would prefer that <code>Created</code>, in the model, is not nullable.</p>