Skip to main content

Module sample

Module sample 

Source
Available on crate feature testkit only.
Expand description

Valid sample objects, for tests that need an object rather than a specific one.

Every object these produce passes Validate; that is asserted by this module’s own tests, so a test that starts from one of these is starting from something conformant.

Functions§

cdr
A completed CDR for a one-hour, 12 kWh session at €0.25/kWh.
cdr_location
The CdrLocation that matches location.
cdr_token
The CdrToken that matches token.
charging_period
A charging period that consumed 12 kWh over one hour.
connector
A Connector with one AC socket.
coordinates
The coordinates the specification’s Location example uses.
credentials
A credentials object for a CPO platform.
evse
An EVSE with a single connector.
location
A published Location with one EVSE.
session
An active Session that has charged some energy.
tariff
A simple Tariff: a per-kWh price with 10% VAT.
timestamp
A fixed timestamp, so sample objects compare equal across runs.
token
A Token an app user would present.