public void SaveChanges_MultipleDataSets_ShouldCommitAllInternalContexts( Mock<BaseDataSet<int>> dataSet1, Mock<BaseDataSet<string>> dataSet2, FakeDataContext context) { // Arrange context.SetUpDataSet(dataSet1.Object); context.Set<int>(); context.SetUpDataSet(dataSet2.Object); context.Set<string>(); // Act context.SaveChanges(); // Assert dataSet1.Verify(s => s.Commit(), Times.Once); dataSet2.Verify(s => s.Commit(), Times.Once); }
public void Insert(UserV2 user) { _db.Save(user); _db.SaveChanges(); }