public void Update_Should_Update_A_Project_Connection() { _repository .Setup(it => it.Update(It.IsAny<Int32>(), It.IsAny<Int32>(), It.IsAny<Int32>(), It.IsAny<Int32>())) .Callback<Int32, Int32, Int32, Int32>((projectId, connectionId, original_ProjectId, original_ConnectionId) => { var tProject_Connection = _repositoryList.Find(x => x.ProjectId==projectId & x.ConnectionId==connectionId); }); var tempProject_Connection = _repositoryList.Find(x => x.ProjectId==projectId & x.ConnectionId==connectionId); var testProject_Connection = new Project_Connection { ProjectId = tempProject_Connection.ProjectId, ConnectionId = tempProject_Connection.ConnectionId}; //TODO change something on testProject_Connection //testProject_Connection.oldValue = newValue; _target.Update(testProject_Connection); //Assert.AreEqual(newValue, _repositoryList.Find(x => x.ProjectId==1 & x.ConnectionId==1).oldValue); //TODO fail until we update the test above Assert.Fail(); }
public void Update_Should_Update_A_Project_Connection() { _repository .Setup(it => it.Update(It.IsAny <Int32>(), It.IsAny <Int32>(), It.IsAny <Int32>(), It.IsAny <Int32>())) .Callback <Int32, Int32, Int32, Int32>((projectId, connectionId, original_ProjectId, original_ConnectionId) => { var tProject_Connection = _repositoryList.Find(x => x.ProjectId == projectId & x.ConnectionId == connectionId); }); var tempProject_Connection = _repositoryList.Find(x => x.ProjectId == projectId & x.ConnectionId == connectionId); var testProject_Connection = new Project_Connection { ProjectId = tempProject_Connection.ProjectId, ConnectionId = tempProject_Connection.ConnectionId }; //TODO change something on testProject_Connection //testProject_Connection.oldValue = newValue; _target.Update(testProject_Connection); //Assert.AreEqual(newValue, _repositoryList.Find(x => x.ProjectId==1 & x.ConnectionId==1).oldValue); //TODO fail until we update the test above Assert.Fail(); }