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

            store.AddNewItem(rawItem);

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

            store.AddNewItem(rawItem);

            mocks.MockRawBlobStore.Verify(mrb => mrb.Create(rawItem.ResourceId, rawItem.File), Times.Once());
        }
        public void AddNewItem_AddsItemToQueueForProcessing()
        {
            var mocks = new LocatorMocks();
            var store = new ItemStore(mocks.MockLocator.Object);
            var rawItem = GetSampleItem();

            store.AddNewItem(rawItem);

            mocks.MockQueueStore.Verify(mqs => mqs.Enqueue(Match.Create<ItemBase>(ib => ib.ResourceId == rawItem.ResourceId)), Times.Once());
        }