コード例 #1
0
        public void RemoveChild()
        {
            //Arrange
            int[] expectedChildrens = new int[2] {
                100, 102
            };
            int expectedParent = 0;

            _mapper.RemoveChild(101);

            //Act
            var childrens = _mapper.GetChildren(10);
            var parent    = _mapper.GetParent(101);

            //Assert
            Assert.Equal(expectedChildrens, childrens);
            Assert.Equal(expectedParent, parent);
        }
コード例 #2
0
 public void RemoveInexistentChild()
 {
     Assert.Throws <Exception>(() => _mapper.RemoveChild(500));
 }
コード例 #3
0
 public void RemoveChild(int child)
 {
     _oneToManyMapper.RemoveChild(child);
 }