Add functions to count items on SM

Description

In the interfaces where we have has_, get_, list_all_*

Add a count_* function, that will be needed for testing conformance, also useful to test locally. And it is a minor addition to the interfaces.

For instance on tests we need to check we have 0 opts, instead of calling list_all_opts() and counting items in the result, we can use count_opts() directly. This simplifies test implementation (e.g. in cucumber, spock or whatever tool).

Environment

None

Activity

Show:
Thomas Beale
February 13, 2019, 2:55 PM

I've added functions called xxx_count() (sounds more normal in English) to the Definition package interfaces.

Pablo Pazos
February 26, 2019, 5:01 AM

Seen the added functions on the spec>

+ artefacts_count
+ archetypes_count
+ templates_count
+ opts_count

https://github.com/openEHR/specifications-SM/commit/3da77e559887a52a61bf1f2f4c2e38520c09a608#diff-17d035e1aefefa3c2516b8e4c2a7a697R111

Looks goods for me!

Pablo Pazos
October 1, 2019, 12:59 AM

I think this is done, if the changes are merged, you can close this one, thanks.

Reporter

Pablo Pazos

Labels

None

Components

Priority

Minor
Configure