public async void Name_Update_length()
        {
            Mock <IDeviceActionRepository> deviceActionRepository = new Mock <IDeviceActionRepository>();

            deviceActionRepository.Setup(x => x.Get(It.IsAny <int>())).Returns(Task.FromResult(new DeviceAction()));

            var validator = new ApiDeviceActionRequestModelValidator(deviceActionRepository.Object);
            await validator.ValidateUpdateAsync(default(int), new ApiDeviceActionRequestModel());

            validator.ShouldHaveValidationErrorFor(x => x.Name, new string('A', 91));
        }
        public async void DeviceId_Update_Valid_Reference()
        {
            Mock <IDeviceActionRepository> deviceActionRepository = new Mock <IDeviceActionRepository>();

            deviceActionRepository.Setup(x => x.GetDevice(It.IsAny <int>())).Returns(Task.FromResult <Device>(new Device()));

            var validator = new ApiDeviceActionRequestModelValidator(deviceActionRepository.Object);
            await validator.ValidateUpdateAsync(default(int), new ApiDeviceActionRequestModel());

            validator.ShouldNotHaveValidationErrorFor(x => x.DeviceId, 1);
        }