public void FinishProcessingItem_RemovesRawItemFromBlobStore()
        {
            var mocks = new LocatorMocks();
            var store = new ItemStore(mocks.MockLocator.Object);
            var rawItem = GetSampleItem();

            store.StoreFinishedItem(rawItem);

            mocks.MockRawBlobStore.Verify(b => b.Delete(rawItem.ResourceId), Times.Once());
        }
        public void FinishProcessingItem_UpdatesTableStoreInformation()
        {
            var mocks = new LocatorMocks();
            var store = new ItemStore(mocks.MockLocator.Object);
            var rawItem = GetSampleItem();

            store.StoreFinishedItem(rawItem);

            mocks.MockTableStore.Verify(ts => ts.Update(Match.Create<ItemBase>(ib => ib.ResourceId == rawItem.ResourceId)), Times.Once());
        }
        public void FinishProcessingItem_AddsItemToFinishedBlobStore()
        {
            var mocks = new LocatorMocks();
            var store = new ItemStore(mocks.MockLocator.Object);
            var rawItem = GetSampleItem();

            store.StoreFinishedItem(rawItem);

            mocks.MockFinishedBlobStore.Verify(b => b.Create(rawItem.ResourceId, rawItem.File), Times.Once());
        }