Mediate.Conformance.Law (mediate_conformance v0.1.0)

Copy Markdown View Source

The law table under "The laws" in the conformance document as data. Each row has an id, a sentence, and the controls it answers. Mediate.Conformance.AdapterCase names each test from a row here. The freeze test in mediate holds this table to the document row for row, so a change to one needs a commit that changes both.

The bodies are in Mediate.Conformance.AdapterCase.Laws and its modules.

Summary

Types

t()

One law: its id, its sentence, and the controls it answers.

Functions

Every law, in the order of the document.

The law with this id. Raises for an id the table does not hold.

The law ids, in the order of the document.

The test name of a law, its id and its sentence.

Types

t()

@type t() :: %Mediate.Conformance.Law{
  controls: [String.t()],
  id: String.t(),
  sentence: String.t()
}

One law: its id, its sentence, and the controls it answers.

Functions

all()

@spec all() :: [t()]

Every law, in the order of the document.

fetch!(id)

@spec fetch!(String.t()) :: t()

The law with this id. Raises for an id the table does not hold.

ids()

@spec ids() :: [String.t()]

The law ids, in the order of the document.

name(id)

@spec name(String.t()) :: String.t()

The test name of a law, its id and its sentence.