public void Verify_Update_Should_SetTheEntityStateToModified() { // Arrange Mock <IDbSet <PowerAlias> > mockSetPowerAliases; var mockContext = PowerAliasesMockingSetup.DoMockingSetupForContext(true, out mockSetPowerAliases); var repository = new PowerAliasesRepository(mockContext.Object); var powerAliases = repository.Get(1); powerAliases.ApiDetailUrl = "/TEST"; // Act repository.Update(powerAliases); // Assert mockContext.Verify(x => x.SetModified(It.IsAny <object>()), Times.Once); }
public void Verify_Update_Should_SetTheEntityStateToModified() { // Arrange Mock<IDbSet<PowerAlias>> mockSetPowerAliases; var mockContext = PowerAliasesMockingSetup.DoMockingSetupForContext(true, out mockSetPowerAliases); var repository = new PowerAliasesRepository(mockContext.Object); var powerAliases = repository.Get(1); powerAliases.ApiDetailUrl = "/TEST"; // Act repository.Update(powerAliases); // Assert mockContext.Verify(x => x.SetModified(It.IsAny<object>()), Times.Once); }