public EmployeeCostEntryViewModel( IMessageBroker messageBroker, IEmployeeCostService costService, IEmployeeService employeeService, SaveEmployeeCostCommand saveCostCommand, CancelCommand cancelCommand, ShowEmployeeCostCommand showListCommand ) { this.messageBroker = messageBroker; this.costService = costService; this.employeeService = employeeService; ActualSaveCommand = saveCostCommand; CancelCommand = cancelCommand; ShowCostListCommand = showListCommand; InitializeCommands(); NavigationCommands = new List<CommandBase>{SaveCommand,CancelCommand}; CancelCommand.Action = broker => showListCommand.Execute(null); PropertiesToValidate = new List<string>() { "Date", "Total", "Details" }; Employees = new ObservableCollection<Employee>(employeeService.GetAll()); SubscribeMessages(); }
public SaveEmployeeCostCommandTests() { brokerMock = new Mock<IMessageBroker>(); serviceMock = new Mock<IEmployeeCostService>(); command = new SaveEmployeeCostCommand(brokerMock.Object, serviceMock.Object); }