Example #1
0
 public void SetUp()
 {
     _itemsGateway     = Substitute.For <IItemsGateway>();
     _view             = Substitute.For <IAddItemView>();
     _navigator        = Substitute.For <INavigator>();
     _addItemPresenter = new AddItemPresenter(
         new AddItemInteractor(_view, _itemsGateway),
         new Executor(),
         _navigator);
 }
        public AddItemPresenter(IAddItemView p_view, IItemDao p_itemDao)
        {
            m_view = p_view;
            m_itemDao = p_itemDao;

            ItemDataEntity itemDataEntity = new ItemDataEntity();
            ItemViewModel itemViewModel = new ItemViewModel(itemDataEntity);

            m_itemCategoryDao = new ItemCategoryDao();
            m_itemGenericDao = new ItemGenericDao();

            m_viewModel = itemViewModel;
            m_view.ShowItem(m_viewModel);
        }
 public AddItemInteractor(IAddItemView view, IItemsGateway itemsGateway)
 {
     _view         = view;
     _itemsGateway = itemsGateway;
 }