protected override void Given() { base.Given(); _model = new OrderItemShipmentModel {IsPackaged = false}; ViewModel.Initialize(new CustomerModel(), new OrderShipmentModel {Items = {_model, new OrderItemShipmentModel {IsPackaged = false}}}); ViewModel.PropertyChanged += (sender, args) => _raisedProperties.Add(args.PropertyName); _itemInList = ViewModel.ItemsToPack.First(); _itemInList.Model.Returns(_model); _itemInList.IsSelected.Returns(true); }
protected override void Given() { _viewModel = new OrderListItemViewModel(); _model = new OrderItemShipmentModel { OrderItem = new OrderItemModel { Item = new ItemModel { Id = 18, Name = "Test item" }, Quantity = 4 } }; _viewModel.PropertyChanged += (sender, args) => _raisedProperties.Add(args.PropertyName); }