public void UpdateParent() { //Arrange int[] expectedChildrens = new int[2] { 200, 201 }; int expectedParent = 21; _mapper.UpdateParent(20, 21); //Act var childrens = _mapper.GetChildren(21); var parent0 = _mapper.GetParent(200); var parent1 = _mapper.GetParent(201); //Assert Assert.Equal(expectedChildrens, childrens); Assert.Equal(expectedParent, parent0); Assert.Equal(expectedParent, parent1); }
public void ValidateUpdateParentConstraints(int oldParent, int newParent) { Assert.Throws <ArgumentException>(() => _mapper.UpdateParent(oldParent, newParent)); }
public void UpdateParent(int oldParent, int newParent) { _oneToManyMapper.UpdateParent(oldParent, newParent); }