title: Testing EF Save Changes Modifiers. Passing in DbPropertyValues
body: <p>Trying to do some business logic in C# by overriding the EF SaveChanges method.<br>
  The idea is to have some advanced calculations on things like if this field has changed update this field.  And this field is the sum of the subclass minus some other fields, you know advanced business junk. </p>
  
  <p>Since it's really complicated we want to test the stuffing out of it. Adding tests work great but the updating ones we can't seem to test as we have written an interface where the method in question is passed 
  Signature looks like this </p>
  
  <pre><code>void Update(object entity, DbPropertyValues currentValues, DbPropertyValues originalValues);
  </code></pre>
  
  <p>When calling it in full EF it works beautifully </p>
  
  <pre><code>    public override int SaveChanges()
      {
          var added = ChangeTracker.Entries().Where(p =&gt; p.State == EntityState.Added).Select(p =&gt; p.Entity);
          var updated = ChangeTracker.Entries().Where(p =&gt; p.State == EntityState.Modified).Select(p =&gt; p);
  
          var context = new ChangeAndValidationContext();
  
          foreach (var item in added)
          {
              var strategy = context.SelectStrategy(item);
              strategy.Add(item);
          }
  
          foreach (var item in updated)
          {
              var strategy = context.SelectStrategy(item);
              strategy.Update(item.Entity, item.CurrentValues, item.OriginalValues);
          }
          return base.SaveChanges();
     }
  </code></pre>
  
  <p>We just can't figure out how to pass in the DbPropertyValues original or updated for our tests.  Please help us figure out how to test that method.</p>