Пример #1
0
        public void ValidEquipmentServicesTest()
        {
            var equipmentItems = _service.QueryAllItems().Result;
            var result         = equipmentItems.Length != 0 || equipmentItems != null;

            Assert.IsTrue(result, "The array is empty");
        }
        public void ValidCustomerServicesTest()
        {
            var customers = _service.QueryAllItems().Result;
            var result    = customers.Length != 0 || customers != null;

            Assert.IsTrue(result, "The array is empty");
        }
        public void ValidRepairOrderServicesTest()
        {
            var repairOrders = _service.QueryAllItems().Result;
            var result       = repairOrders.Length != 0 || repairOrders != null;

            Assert.IsTrue(result, "The array is empty");
        }
        public DataTable GetAllRecords()
        {
            var factory = (ApiFactory)Application.Current.Properties["apiFactory"];
            IApiServiceStrategy service = factory.GetInstance(RequestEntity);

            Task <DbObject[]> customers = service.QueryAllItems();

            var dataTableFactory = (DataTableBuilderFactory)Application.Current.Properties["DataTableBuilderFactory"];
            var tableBuilder     = dataTableFactory.GetInstance(RequestEntity);
            var dataTable        = tableBuilder.BuildTable(customers.Result);

            return(dataTable);
        }