using e_suite.API.Common.models; using e_suite.Utilities.Pagination; using Microsoft.AspNetCore.Mvc; using Moq; using NUnit.Framework; namespace eSuite.API.UnitTests.Controllers.BlockedIPsControllerUnitTests; [TestFixture] public class GetBlockedIPsUnitTests: BlockedIPsControllerTestBase { [SetUp] public override async Task Setup() { await base.Setup(); } [Test] public async Task GetBlockedIPs_NormalConditions_ReturnsOkObjResult() { //Arrange var paginatedData = new PaginatedData { Count = 2, Data = new List { new() }, Page = 1, PageSize = 10 }; _blockedIPsManagerMock?.Setup(x => x.GetBlockedIPs(It.IsAny(), It.IsAny())).ReturnsAsync(paginatedData); var paging = new Paging(); //Act var res = await _blockedIPsController.Get(paging); //Assert Assert.That(res, Is.Not.Null); Assert.That(res?.GetType(), Is.EqualTo(typeof(OkObjectResult))); } }