Template
chore: deploy initial code base
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using Strata.ApiLib.Standard.Models;
|
||||
using Strata.ContinuousImprovement.Biz.UtilizationVariation.Opportunities;
|
||||
using Strata.ContinuousImprovement.JazzEntityFrameworkStub;
|
||||
|
||||
namespace Strata.ContinuousImprovement.Biz.Test.Unit.Pagination
|
||||
{
|
||||
[TestFixture, Category("Unit")]
|
||||
public class PaginatedListTest
|
||||
{
|
||||
|
||||
[SetUp]
|
||||
public void TestSetUp()
|
||||
{
|
||||
// Method intentionally left empty.
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestPaginatedList()
|
||||
{
|
||||
// arrange
|
||||
var jeff = new JazzEntityFrameworkFactory();
|
||||
var _opportunities = jeff.UVOpportunities;
|
||||
var pagingInfo = new PagingInfo() { ResultsPerPage = 25, PageNumber = 1, TotalNumberOfResults = 2 };
|
||||
var paginatedList = new PagedApiResponse<UVOpportunity>() { Data = _opportunities, PagingInfo = pagingInfo };
|
||||
|
||||
// act
|
||||
|
||||
// assert
|
||||
paginatedList.PagingInfo.PageNumber.Should().Be(1);
|
||||
paginatedList.PagingInfo.TotalPages.Should().Be(1);
|
||||
paginatedList.PagingInfo.TotalNumberOfResults.Should().Be(2);
|
||||
paginatedList.PagingInfo.ResultsPerPage.Should().Be(25);
|
||||
paginatedList.Data.Should()
|
||||
.AllBeOfType<UVOpportunity>()
|
||||
.And.HaveCount(_opportunities.Count);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TestTearDown()
|
||||
{
|
||||
// Method intentionally left empty.
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user