Esempio n. 1
0
        public async Task TestGetDevice(GetHardwareByIdRequest com, ObjectResult resultAction, bool elementCreated = false)
        {
            Guid createdcompanyId = HardwareComponentsValues.GetHardwareAviability();

            com.Id = elementCreated == true ? createdcompanyId : com.Id;

            HttpResponseMessage actionResult = await _hardwareAPI.GetHardwareById(com);

            base.CheckAssert(actionResult, resultAction);
        }
Esempio n. 2
0
        public async Task TestDeleteDevice(DeleteHardwareByIdRequest delcom, ObjectResult resultAction, bool elementCreated = false)
        {
            Guid createdtransactionId = HardwareComponentsValues.GetHardwareAviability();

            delcom.Id = elementCreated == true ? createdtransactionId : delcom.Id;

            HttpResponseMessage actionResult = await _hardwareAPI.DeleteHardware(delcom);

            base.CheckAssert(actionResult, resultAction);
        }
Esempio n. 3
0
        public async Task TestUpdateHardware(UpdateHardwareRequest obj, ObjectResult resultAction, bool elementCreated = false)
        {
            var createdcompanyId = HardwareComponentsValues.GetHardwareAviability();

            obj.Id = elementCreated == true ? createdcompanyId : obj.Id;

            HttpResponseMessage actionResult = await _hardwareAPI.UpdateHardware(obj);

            base.CheckAssert(actionResult, resultAction);
        }