public void RemoveParent() { //Arrange int[] expectedChildrens = new int[0] { }; // Parentless childs have to return 0 for their parents int expectedParent = 0; _mapper.RemoveParent(40); //Act var childrens = _mapper.GetChildren(40); var parent400 = _mapper.GetParent(400); var parent401 = _mapper.GetParent(401); var parent402 = _mapper.GetParent(403); //Assert Assert.Equal(expectedChildrens, childrens); Assert.Equal(expectedParent, parent400); Assert.Equal(expectedParent, parent401); Assert.Equal(expectedParent, parent402); }
public void RemoveInexistentParent() { Assert.Throws <Exception>(() => _mapper.RemoveParent(50)); }
public void RemoveParent(int parent) { _oneToManyMapper.RemoveParent(parent); }