42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using LCU.Library.Internal.IncentiveApiModels.Entities;
|
|
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
|
using NUnit.Framework;
|
|
|
|
namespace Application.UnitTests.Entities
|
|
{
|
|
public class CommissionTest
|
|
{
|
|
[Test]
|
|
public void HasSameRoleAndProduct_FullMatch_True()
|
|
{
|
|
var commission = new Commission { Role = Role.ABM, Product = Product.ATMCard };
|
|
var fullMatch = new Commission { Role = Role.ABM, Product = Product.ATMCard };
|
|
Assert.True(commission.HasSameRoleAndProduct(fullMatch));
|
|
}
|
|
|
|
[Test]
|
|
public void HasSameRoleAndProduct_NoMatch_False()
|
|
{
|
|
var commission = new Commission { Role = Role.ABM, Product = Product.ATMCard };
|
|
var noMatch = new Commission { Role = Role.Admin, Product = Product.NewChecking };
|
|
Assert.False(commission.HasSameRoleAndProduct(noMatch));
|
|
}
|
|
|
|
[Test]
|
|
public void HasSameRoleAndProduct_OnlyRoleMatch_False()
|
|
{
|
|
var commission = new Commission { Role = Role.ABM, Product = Product.ATMCard };
|
|
var roleMatch = new Commission { Role = Role.ABM, Product = Product.NewChecking };
|
|
Assert.False(commission.HasSameRoleAndProduct(roleMatch));
|
|
}
|
|
|
|
[Test]
|
|
public void HasSameRoleAndProduct_OnlyProductMatch_False()
|
|
{
|
|
var commission = new Commission { Role = Role.ABM, Product = Product.ATMCard };
|
|
var productMatch = new Commission { Role = Role.Admin, Product = Product.ATMCard };
|
|
Assert.False(commission.HasSameRoleAndProduct(productMatch));
|
|
}
|
|
}
|
|
}
|