< Summary

Information
Class: LGDXRobotCloud.API.Areas.Automation.Controllers.AutoTasksNextController
Assembly: LGDXRobotCloud.API
File(s): /builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.API/Areas/Automation/Controllers/AutoTasksNextController.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 27
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)0%620%
AutoTaskNext()100%210%

File(s)

/builds/yukaitung/lgdxrobot2-cloud/LGDXRobotCloud.API/Areas/Automation/Controllers/AutoTasksNextController.cs

#LineLine coverage
 1using LGDXRobotCloud.API.Services.Automation;
 2using LGDXRobotCloud.Data.Models.DTOs.V1.Requests;
 3using LGDXRobotCloud.Utilities.Constants;
 4using Microsoft.AspNetCore.Authorization;
 5using Microsoft.AspNetCore.Mvc;
 6
 7namespace LGDXRobotCloud.API.Areas.Automation.Controllers;
 8
 9[ApiController]
 10[Area("Automation")]
 11[Route("[area]/[controller]")]
 12[Authorize(AuthenticationSchemes = LgdxRobotCloudAuthenticationSchemes.ApiKeyOrCertificationScheme)]
 013public sealed class AutoTasksNextController(
 014    IAutoTaskService autoTaskService
 015  ) : ControllerBase
 16{
 017  private readonly IAutoTaskService _autoTaskService = autoTaskService ?? throw new ArgumentNullException(nameof(autoTas
 18
 19  [HttpPost("{id}")]
 20  [ProducesResponseType(StatusCodes.Status204NoContent)]
 21  [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)]
 22  public async Task<IActionResult> AutoTaskNext(int id, AutoTaskNextDto autoTaskNextDto)
 023  {
 024    await _autoTaskService.AutoTaskNextApiAsync(autoTaskNextDto.RobotId, id, autoTaskNextDto.NextToken);
 025    return NoContent();
 026  }
 27}