All Downloads are FREE. Search and download functionalities are using the official Maven repository.

models.autoRealization.Tests.M1.ExclusivePropertySet.ExclusivePropertySet.md Maven / Gradle / Ivy

There is a newer version: 1.4.2
Show newest version
# Exclusive Property Set

## Description

This test suite introduces exclusive property sets, also called "itemized" 
property sets. These are the equivalent of a RAPID-ML property set declared
`with only properties`. It lists the included properties, along with 
optional realization specifications, which may include cardinality constraints,
primitive property constraints, and recursive reference treatments.

In an exclusive property set, properties are excluded by default; they are 
included if they are explicitly listed in the `includedProperties` list. 
An `excludedProperties` list is not needed, and not allowed. 

## Prerequisites

This test suite builds on the `InclusivePropertySet` tests.

## Tests

### OnlyReferenceProperties

Description
The resourceAPI defines contains only one resource, which is `TaxFilingObject`. The realizationModel defines only one template, which applies to all references. It uses an exclusive property set that includes only reference properties. This should create a realization for `TaxFiling`, having only a reference to a `Person` realization. The Person realization is an empty object, because it has no reference properties; therefore all of its properties are excluded.
RAPID Model
ExclusivePropertySet_OnlyReference.rapid
Assertions
``` OnlyReference model.tbTaxFilingObject.check [ named("TaxFiling_OnlyReference").selects("AllObjects") withProps [ includingRef("taxpayer") [ named("Person_OnlyReference").selects("AllObjects") withNoProps ] checkedAll ] ] ```
### OnlyPrimitiveProperties
Description
The resourceAPI defines contains only one resource, which is `TaxFilingObject`. The realizationModel defines only one template, which applies to all references. It uses an exclusive property set with _only primitive properties_. This should create a realization for `TaxFiling`, having only primitive properties. There should not be a realization for `Person`, because the `taxpayer` reference property is excluded, so `Person` is unreachable.
RAPID Model
ExclusivePropertySet_OnlyPrimitive.rapid
Assertions
``` OnlyPrimitive model.tbTaxFilingObject.check [ named("TaxFiling_OnlyPrimitive").selects("AllObjects") withOnlyProps("filingID", "jurisdiction", "year", "period", "currency", "grossIncome", "taxLiability") ] ```




© 2015 - 2024 Weber Informatics LLC | Privacy Policy