Newer
Older
TestingWithoutInterfaces / tests / UnitTests / Web / Extensions / CacheHelpersTests / GenerateCatalogItemCacheKey.cs
@Derek Comartin Derek Comartin on 5 Dec 2022 524 bytes Init
using Microsoft.eShopWeb.Web;
using Microsoft.eShopWeb.Web.Extensions;
using Xunit;

namespace Microsoft.eShopWeb.UnitTests.Web.Extensions.CacheHelpersTests;

public class GenerateCatalogItemCacheKey
{
    [Fact]
    public void ReturnsCatalogItemCacheKey()
    {
        var pageIndex = 0;
        int? brandId = null;
        int? typeId = null;

        var result = CacheHelpers.GenerateCatalogItemCacheKey(pageIndex, Constants.ITEMS_PER_PAGE, brandId, typeId);

        Assert.Equal("items-0-10--", result);
    }
}