コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: NärModellSätts.cs プロジェクト: bjorse/tdd-demo
 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);
 }