Ejemplo n.º 1
0
        public void Should_update_count_when_cleared()
        {
            // given
            var list = new RdfListAdapter <IRdfListOwner, IRdfListNode <int>, int>(_context, _entity.Object, _override)
            {
                4, 5, 6, 7, 8
            };

            // then
            list.Clear();

            // then
            list.Count.Should().Be(0);
        }
Ejemplo n.º 2
0
        public void Should_allow_clearing_entire_list()
        {
            // given
            var list = new RdfListAdapter <IRdfListOwner, IRdfListNode <int>, int>(_context, _entity.Object, _override)
            {
                4, 8, 8, 41, 666
            };

            // when
            list.Clear();

            // then
            list.Should().BeEmpty();
            _contextMock.Verify(c => c.Delete(It.IsAny <BlankId>()), Times.Exactly(5));
        }