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 System.Reflection;
|
|
|
|
|
using Connected.Common.Types.TaxRates;
|
|
|
|
|
using Connected.Entities.Annotations;
|
|
|
|
|
using Connected.Entities.Consistency;
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|