using System.Collections.Generic;
using System.Web.Http;
using CncModels.Dto.Common;
using CncModels.Dto.Screen;
using CncWebApi.Controllers;
using Xunit;
namespace CncWebApi.Tests
{
///
/// ScreenController单元测试
/// 大屏看板接口(无需认证)
///
[Collection("Database")]
public class ScreenControllerTests
{
private readonly ScreenController _controller;
public ScreenControllerTests()
{
TestDb.TruncateAll();
_controller = ControllerFactory.CreateScreenController();
}
///
/// 辅助:从ApiResponse<object>中获取interval值
/// Controller返回 Ok(ApiResponse<object>.Success(new { interval }))
///
private static int GetIntervalFromResult(IHttpActionResult result)
{
// 先获取Content(ApiResponse