public void Update_should_update_item()
        {
            //given
            var repository = new TopNavigationRepository(_context.Object);

            //when
            repository.Update(new TopNavigation());
        }
        public void Update_with_wrong_data_should_create_errors()
        {
            //given
            _context.Setup(x => x.Save(It.IsAny <TopNavigation>(), true, false))
            .Throws(new Exception("Could not update item"));
            var repository = new TopNavigationRepository(_context.Object);

            //when
            var result = repository.Update(null);

            //then
            result.Should().BeFalse();

            repository.RepositoryErrors
            .LastOrDefault()
            .Message
            .Should()
            .Be("Could not update item");
        }