45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
|
|
using Meezi.Core.Constants;
|
||
|
|
using Meezi.Core.Enums;
|
||
|
|
using Xunit;
|
||
|
|
|
||
|
|
namespace Meezi.API.Tests;
|
||
|
|
|
||
|
|
public class PlanLimitsTests
|
||
|
|
{
|
||
|
|
[Theory]
|
||
|
|
[InlineData(PlanTier.Free, 1)]
|
||
|
|
[InlineData(PlanTier.Pro, 3)]
|
||
|
|
public void MaxBranches_MatchesTier(PlanTier tier, int expected)
|
||
|
|
{
|
||
|
|
Assert.Equal(expected, PlanLimits.MaxBranches(tier));
|
||
|
|
}
|
||
|
|
|
||
|
|
[Fact]
|
||
|
|
public void MaxBranches_Business_IsUnlimited()
|
||
|
|
{
|
||
|
|
Assert.Equal(int.MaxValue, PlanLimits.MaxBranches(PlanTier.Business));
|
||
|
|
}
|
||
|
|
|
||
|
|
[Theory]
|
||
|
|
[InlineData(PlanTier.Free, 8)]
|
||
|
|
[InlineData(PlanTier.Pro, 90)]
|
||
|
|
public void MaxReportHistoryDays_MatchesTier(PlanTier tier, int expected)
|
||
|
|
{
|
||
|
|
Assert.Equal(expected, PlanLimits.MaxReportHistoryDays(tier));
|
||
|
|
}
|
||
|
|
|
||
|
|
[Fact]
|
||
|
|
public void MaxReportHistoryDays_Business_IsUnlimited()
|
||
|
|
{
|
||
|
|
Assert.Equal(int.MaxValue, PlanLimits.MaxReportHistoryDays(PlanTier.Business));
|
||
|
|
}
|
||
|
|
|
||
|
|
[Theory]
|
||
|
|
[InlineData(PlanTier.Free, 1)]
|
||
|
|
[InlineData(PlanTier.Pro, 3)]
|
||
|
|
public void MaxTerminals_MatchesTier(PlanTier tier, int expected)
|
||
|
|
{
|
||
|
|
Assert.Equal(expected, PlanLimits.MaxTerminals(tier));
|
||
|
|
}
|
||
|
|
}
|