public void RemoveItemViewModel_BarcodeAction_CorrectBarcode()
        {
            Item item = new Item();

            item.ItemId = 8;

            _fakeBackendConnection.CheckBarcode("705632085943").Returns(item);
            _camConnection.SimulateEventFromVideoCaptureDevice(myBitmap);

            _fakeBackendConnection.Received(1).GetListOfInventoryItems(8);
        }
Exemplo n.º 2
0
        private async void BarcodeAction(object sender, EventArgs e)
        {
            InventoryItem.Item.Ean = CameraViewModel.Barcode;

            try
            {
                InventoryItem.Item = await _backendConnection.CheckBarcode(InventoryItem.Item.Ean);
            }
            catch (ApiException exception)
            {
                ItemNotFound(exception.StatusCode);
            }
            catch (HttpRequestException exception)
            {
                MessageBox.Show($"Der er ingen forbindele til serveren", "Error!");
            }

            GetInventoryItemsList();
        }