public void Setup() { _backendConnection = Substitute.For <IBackendConnection>(); _findItemViewModel = Substitute.For <IFindItemViewModel>(); _uut = new ShoppingListViewModel(_backendConnection, _findItemViewModel); _obj = new object(); }
public ShoppingListViewModel(IBackendConnection backendConnection, IFindItemViewModel findItemViewModel) { _backendConnection = backendConnection; FindItemViewModel = findItemViewModel; _currentItem = new InventoryItem(); InventoryItems = new ObservableCollection <InventoryItem>(); GetShoppingList(); }
public void Setup() { _fakeVideoSource = Substitute.For <IVideoSource>(); _timer = new TimerClock(100); _barcodeReader = new ReadBarcode(); _fakeOutput = Substitute.For <IOutput>(); _camConnection = new CameraConnection(_timer, _barcodeReader, _fakeVideoSource, _fakeOutput); _soundPlayer = new SoundPlayer(_fakeOutput); _cameraViewModel = new CameraViewModel(_camConnection, _soundPlayer); _fakeBackendConnection = Substitute.For <IBackendConnection>(); _findItemViewModel = new FindItemViewModel(_fakeBackendConnection, _cameraViewModel); _obj = new object(); _sut = new ShoppingListViewModel(_fakeBackendConnection, _findItemViewModel); }