public void RollbackIndexToIndex_RunFullUpdate_ValuesAreReplacedRoleBackPartial() { var databaseVersionSetup = GetVersionSetup(); var mockIDatabase = new Mock<IConnection>(MockBehavior.Strict); var mockITransaction = new Mock<ITransaction>(MockBehavior.Strict); mockIDatabase.Setup(mc => mc.GetTransaction()).Returns(mockITransaction.Object); mockIDatabase.Setup(mc => mc.SwitchToDatabase("Intercontinental4", mockITransaction.Object)); _mockITracker.Setup(mc => mc.GetVersion(It.IsAny<DatabaseVersionSetup.Profile>(), mockITransaction.Object)).Returns(4); mockIDatabase.Setup(mc => mc.ExecuteSql("RoleBack4 test0 test1Prof|withvar|Intercontinental4| test2|over ${test3}", mockITransaction.Object)).Returns(1); mockIDatabase.Setup(mc => mc.ExecuteSql("RoleBack3 test0 test1Prof|withvar|Intercontinental4| test2|over ${test3}", mockITransaction.Object)).Returns(1); _mockITracker.Setup(mc => mc.SetVersion(It.IsAny<DatabaseVersionSetup.Profile>(), 2, mockITransaction.Object)); mockITransaction.Setup(mc => mc.Commit()); mockITransaction.Setup(mc => mc.Dispose()); mockSqlServerDatabaseProfile.Setup(mc => mc.GetDatabase()).Returns(mockIDatabase.Object); //act _dvcController = new DvcController(databaseVersionSetup, DefaultProfile, true); _dvcController.RollbackIndexToIndex(3); mockSqlServerDatabaseProfile.VerifyAll(); mockIDatabase.VerifyAll(); mockITransaction.VerifyAll(); _mockITracker.VerifyAll(); }