public ServiceAdministrationPageViewModel()
 {
     ReturnToMainMenuCommand = new DelegateCommand(o => ReturnToMainMenu());
     Service         = new ServicesService();
     GetServicesTask = new TaskWatcher <ObservableCollection <Service> >(Service.GetAllServices());
     GetServicesTask.Task.GetAwaiter().OnCompleted(() => PopulateBindingData());
 }
예제 #2
0
    public void ShouldReturnSpecialService()
    {
        var expectedEmployeeName = BusinessRules.specialKey;

        // Arrange
        A.CallTo(() => _employeeRepository.GetAllEmployees()).Returns(
            new List <Employees> {
            new Employees {
                First    = expectedEmployeeName,
                Last     = "Robison",
                Services = new Services {
                    Item = "Repair/Remodel",
                }
            }
        }
            );

        // Act
        var servicesDtos = _serviceService.GetAllServices();

        // Assert (FluentAssertions)
        servicesDtos.Single(pdto => pdto.Special).First.Should().Be(expectedEmployeeName);
    }
예제 #3
0
 async void Init()
 {
     Services = new ObservableCollection <ServiceDto>(await servicesService.GetAllServices());
 }
예제 #4
0
        public IActionResult Get(string officeType)
        {
            var result = servicesService.GetAllServices(officeType);

            return(Ok(result));
        }
예제 #5
0
 public List <Service> GetAllServices()
 {
     return(service.GetAllServices());
 }