31 lines
930 B
C#
31 lines
930 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using LCU.Library.Internal.IncentiveApiModels.Entities;
|
|
using LCU.Library.Internal.IncentiveApiModels.Enums;
|
|
|
|
using NUnit.Framework;
|
|
|
|
namespace Application.UnitTests.Models
|
|
{
|
|
public class ProductDetailTest
|
|
{
|
|
[Test]
|
|
public void AssertProductDetailList()
|
|
{
|
|
// Ensure every product has a detail
|
|
foreach (Product product in Enum.GetValues(typeof(Product)))
|
|
{
|
|
Assert.NotNull(ProductDetail.DetailsForProduct(product));
|
|
}
|
|
|
|
// Ensure there isn't more than one detail per product.
|
|
var checkList = new Dictionary<Product, ProductDetail>();
|
|
foreach (var detail in ProductDetail.ProductDetails)
|
|
{
|
|
Assert.False(checkList.ContainsKey(detail.Product));
|
|
checkList[detail.Product] = detail;
|
|
}
|
|
}
|
|
}
|
|
}
|