public EmployeeCostListViewModel(IMessageBroker broker, IClientContext clientContext, IEmployeeCostService costService,
                                         NewEmployeeCostCommand newCommand, EditEmployeeCostCommand editCommand, DeleteEmployeeCostCommand deleteCommand,
                                         RefreshCommand refreshCommand)
        {
            this.broker      = broker;
            this.costService = costService;
            pageSize         = clientContext.PageSize;

            NewCommand                 = newCommand;
            EditCommand                = editCommand;
            DeleteCommand              = deleteCommand;
            RefreshCommand             = refreshCommand;
            RefreshCommand.MessageName = CommonMessages.RefreshEmployeeCostList;
            NavigationCommands         = new List <CommandBase> {
                NewCommand, DeleteCommand, RefreshCommand
            };

            SubscribeMessages();
        }
Example #2
0
 public EditEmployeeCostCommandTests()
 {
     brokerMock = new Mock <IMessageBroker>();
     command    = new EditEmployeeCostCommand(brokerMock.Object);
 }