You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Connected.Entities.Annotations;
|
|
|
|
|
using Connected.Entities.Consistency;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
|
|
namespace Common.Types.TaxRates;
|
|
|
|
|
|
|
|
|
|
[TestClass]
|
|
|
|
|
public class TaxRateTests
|
|
|
|
|
{
|
|
|
|
|
[TestMethod("TaxRate is ConsistentEntity<>")]
|
|
|
|
|
public void TaxRate_IsConsistentEntity()
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* Test
|
|
|
|
|
*/
|
|
|
|
|
var isConsistentEntity = typeof(TaxRate).IsAssignableToGenericType(typeof(ConsistentEntity<>));
|
|
|
|
|
/*
|
|
|
|
|
* Assert
|
|
|
|
|
*/
|
|
|
|
|
Assert.IsTrue(isConsistentEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[TestMethod("TaxRate has exactly one schema")]
|
|
|
|
|
public void TaxRate_HasExactlyOneSchema()
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* Test
|
|
|
|
|
*/
|
|
|
|
|
var tableAttributes = typeof(TaxRate).GetCustomAttributes<TableAttribute>();
|
|
|
|
|
/*
|
|
|
|
|
* Assert
|
|
|
|
|
*/
|
|
|
|
|
Assert.IsTrue(tableAttributes.Count() == 1);
|
|
|
|
|
}
|
|
|
|
|
}
|