public void ExceptionIsThrownWhenFullNameIsEmptyWhenRemovingSavedMetadata(
            string fullName)
        {
            // Arrange

            var service = new PinnedItemStorageService(
                Mock.Of <IIOService>());

            // Act, Assert

            Assert.Throws <ArgumentException>(() =>
                                              service.Remove(fullName));
        }
        public void FullNameIsHashedWhenRemovingSavedMetadata()
        {
            // Arrange

            var ioService = Mock.Of <IIOService>(s =>
                                                 s.FileExists(_hashedPath) == true);

            var service = new PinnedItemStorageService(ioService);

            // Act

            service.Remove(FullName);

            // Assert

            Mock.Get(ioService).Verify(s =>
                                       s.Delete(_hashedPath));
        }
        public void SavedMetadataIsNotRemovedIfFullNamePathDoesNotExist()
        {
            // Arrange

            var ioService = Mock.Of <IIOService>(s =>
                                                 s.FileExists(It.IsAny <string>()) == false);

            var service = new PinnedItemStorageService(ioService);

            // Act

            service.Remove(FullName);

            // Assert

            Mock.Get(ioService).Verify(s =>
                                       s.Delete(It.IsAny <string>()),
                                       Times.Never);
        }