Example #1
0
 public void SetUpTest()
 {
     mocks     = new MockRepository();
     service   = mocks.CreateMock <IShippingService>();
     screen    = mocks.CreateMock <IShippingScreen>();
     presenter = new ShippingScreenPresenter(screen, service);
 }
Example #2
0
        public ShippingScreenPresenter(IShippingScreen screen, IShipperRepository repository)
        {
            _screen = screen;
            _screen.AttachShippingScreenPresenter(this);
            _repository = repository;

            screen.States = repository.GetShippableStates();
            ShipperSelected();
        }
        public ShippingScreenPresenter(IShippingScreen screen, IShipperRepository repository)
        {
            _screen = screen;
            _screen.AttachShippingScreenPresenter(this);
            _repository = repository;

            screen.States = repository.GetShippableStates();
            ShipperSelected();
        }
Example #4
0
        public ShippingScreenPresenter(IShippingScreen view, IShippingService service, Shipment shipment)
        {
            _view     = view;
            _service  = service;
            _shipment = shipment;

            // Since we're got the INotifyPropertyChanged interface on Shipment,
            // we might as well use it to trigger updates to the Cost
            _shipment.PropertyChanged += new PropertyChangedEventHandler(_shipment_PropertyChanged);
        }
        public ShippingScreenPresenter(IShippingScreen view, IShippingService service, Shipment shipment)
        {
            _view = view;
            _service = service;
            _shipment = shipment;

            // Since we're got the INotifyPropertyChanged interface on Shipment,
            // we might as well use it to trigger updates to the Cost
            _shipment.PropertyChanged += new PropertyChangedEventHandler(_shipment_PropertyChanged);
        }
Example #6
0
        public void SetUpTest()
        {
            shipment = new Shipment();
            shipment.StateOrProvince = "Testville";
            shipment.Vendor          = "Test";
            shipment.ShippingOption  = "Carrier Pigeon";

            mocks     = new MockRepository();
            service   = mocks.CreateMock <IShippingService>();
            screen    = mocks.CreateMock <IShippingScreen>();
            presenter = new ShippingScreenPresenter(screen, service, shipment);
        }
        public void SetUpTest()
        {
            shipment = new Shipment();
            shipment.StateOrProvince = "Testville";
            shipment.Vendor = "Test";
            shipment.ShippingOption = "Carrier Pigeon";

            mocks = new MockRepository();
            service = mocks.CreateMock<IShippingService>();
            screen = mocks.CreateMock<IShippingScreen>();
            presenter = new ShippingScreenPresenter(screen, service, shipment);
        }
Example #8
0
 public ShippingScreenPresenter(IShippingScreen view, IShippingService service) : this(view, service, new Shipment())
 {
 }
 public ShippingScreenPresenter(IShippingScreen view, IShippingService service)
     : this(view, service, new Shipment())
 {
 }
 public void SetUpTest()
 {
     mocks = new MockRepository();
     service = mocks.CreateMock<IShippingService>();
     screen = mocks.CreateMock<IShippingScreen>();
     presenter = new ShippingScreenPresenter(screen, service);
 }