* Rename/Move/duplicate PaginationService to facilitate conversion closer to the data layer Duplication is because of internal modifier as we don't want to expose these temporary classes * Move Guid to Int Extensions into core + add unittests * Added Document version endpoints Updated used services to use async methods * Moved PaginationConverter into core so it can be used by the service layer * Endpoint structure improvements * Updating OpenApi.json * Add greedy constructors for contentService tests * Namespace changes and naming cleanup * Update openapispec again... * Refactor injected services * PR suggestion updates - Move endpoints into their own structural section as they are also in a different swagger section - Naming improvements - Allign PresentationFactories with similar classes - Cleanup unused assignments - Cleanup refactoring comments - Improve obsoletion remarks * Cleanup * ResponseModel improvements * OpenApi spec update --------- Co-authored-by: Sven Geusens <sge@umbraco.dk> Co-authored-by: Elitsa <elm@umbraco.dk>
30 lines
832 B
C#
30 lines
832 B
C#
using NUnit.Framework;
|
|
using Umbraco.Cms.Core.Extensions;
|
|
using Umbraco.Extensions;
|
|
|
|
namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Core.Extensions;
|
|
|
|
[TestFixture]
|
|
public class IntGuidIntConversionTests
|
|
{
|
|
[TestCase(int.MinValue)]
|
|
[TestCase(int.MaxValue)]
|
|
[TestCase(int.MinValue / 2)]
|
|
[TestCase(int.MinValue / 5)]
|
|
[TestCase(int.MinValue / 707)]
|
|
[TestCase(int.MinValue / 1313)]
|
|
[TestCase(int.MinValue / 17017)]
|
|
[TestCase(int.MaxValue / 2)]
|
|
[TestCase(int.MaxValue / 5)]
|
|
[TestCase(int.MaxValue / 707)]
|
|
[TestCase(int.MaxValue / 1313)]
|
|
[TestCase(int.MaxValue / 17017)]
|
|
public void IntoToGuidToInt_NoChange(int startValue)
|
|
{
|
|
var intermediateValue = startValue.ToGuid();
|
|
var endValue = intermediateValue.ToInt();
|
|
|
|
Assert.AreEqual(startValue, endValue);
|
|
}
|
|
}
|