[DEV-6306] Add retry template
[DEV-6306] Add testing instructions to README.md [DEV-6306] Add assertion to retry templatemaster
parent
9f02781a5b
commit
e1076ce388
18
README.md
18
README.md
|
@ -62,6 +62,24 @@ $ export HOXSL=/path/to/hoxsl/root
|
|||
$ ./boostrap
|
||||
```
|
||||
|
||||
## Running Test Cases
|
||||
To run the test cases, invoke `make check` (or its alias, `make test`).
|
||||
|
||||
##### Testing Core Features
|
||||
In order to run tests located at `core/test/core/**`, a supporting environment
|
||||
is required. (e.g. mega rater). Inside a supporting rater, either check out a
|
||||
submodule containing the core tests, or temporarily add them into the
|
||||
submodule.
|
||||
|
||||
Build the core test suite summary page using:
|
||||
|
||||
```bash
|
||||
$ make rater/core/test/core/suite.html
|
||||
```
|
||||
|
||||
Visit the summary page in a web browser and click the __Calculate Premium__
|
||||
button. If all test cases pass, it will yield a value of __$1__.
|
||||
|
||||
|
||||
## Hacking
|
||||
Information for TAME developers can be found in the file `HACKING`.
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0"?>
|
||||
<package xmlns="http://www.lovullo.com/rater"
|
||||
xmlns:c="http://www.lovullo.com/calc"
|
||||
xmlns:t="http://www.lovullo.com/rater/apply-template"
|
||||
title="Retry rating state">
|
||||
|
||||
<import package="assert" export="true" />
|
||||
<import package="base" />
|
||||
<import package="extern" />
|
||||
<import package="vector/cmatch" export="true" />
|
||||
|
||||
<t:classify-extern yields="__retry" />
|
||||
|
||||
<template name="_suggest-retry-when_" desc="Retry Rating">
|
||||
<param name="@values@" desc="Rule matches" />
|
||||
|
||||
<classify as="__retry" yields="__retry"
|
||||
desc="Retry state for a supplier">
|
||||
<param-copy name="@values@" />
|
||||
</classify>
|
||||
|
||||
<t:assert failure="Retrying suppliers are ineligible">
|
||||
<t:match-eq on="__retry" value="FALSE" />
|
||||
</t:assert>
|
||||
</template>
|
||||
|
||||
</package>
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Copyright (C) 2014-2019 Ryan Specialty Group, LLC.
|
||||
|
||||
This file is part of tame-core.
|
||||
|
||||
tame-core is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<package xmlns="http://www.lovullo.com/rater"
|
||||
xmlns:c="http://www.lovullo.com/calc"
|
||||
xmlns:t="http://www.lovullo.com/rater/apply-template"
|
||||
desc="Retry definition specs">
|
||||
|
||||
<import package="../spec" />
|
||||
|
||||
<import package="../../base" />
|
||||
<import package="../../retry" />
|
||||
|
||||
|
||||
<t:describe name="_suggest-retry-when_">
|
||||
<!-- Due to the assertion nature of this template, positive cases aren't
|
||||
testable-->
|
||||
<t:it desc="retry is never allowed">
|
||||
<t:suggest-retry-when>
|
||||
<t:match-class name="never" />
|
||||
</t:suggest-retry-when>
|
||||
|
||||
<t:given>
|
||||
<c:value-of name="__retry" />
|
||||
</t:given>
|
||||
|
||||
<t:expect>
|
||||
<t:match-result eq="0" />
|
||||
</t:expect>
|
||||
</t:it>
|
||||
</t:describe>
|
||||
|
||||
</package>
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
<import package="aggregate" />
|
||||
<import package="insurance" />
|
||||
<import package="retry" />
|
||||
<import package="symbol" />
|
||||
<import package="tplgen" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue