Since the MutationContext<T> is not injectible into my code because of the ctor, I cant Moq it or test it.
IE:
.AddSingleton<MutationContext<Customer>>()
Later:
public class CustomerRepository
{
public MutationContext<Customer> customerMutationContext { get; set; }
public CustomerRepository(MutationContext<Customer> customerMutationContext)
{
this.customerMutationContext = customerMutationContext;
}
public void SaveCustomer(Customer cust)
{
this.customerMutationContext.Init(cust).Mutate();
}
}