smart_city_test v2.2.2 SmartCity.TestDataGenerator View Source
Module that generates test data for Smart City project.
Link to this section Summary
Functions
Creates and returns a new SmartCity.AccessGroup
example
Creates and returns a new SmartCity.Data
example
Creates and returns a predefined number of SmartCity.Data
examples
Creates and returns a new SmartCity.Dataset
example
Creates and returns a new SmartCity.Ingestion
example
Creates and returns a new SmartCity.Organization
example
Creates and returns a new SmartCity.Ingestion.Transformation
example
Creates a SmartCity.User with defined overrides. Overrides are a map which can contain the keys: subject_id, email, name. If an override is not provided for a particular property, a random one will be generated.
Link to this section Functions
create_access_group(overrides)
View Sourcecreate_access_group( %{ optional(:description) => String.t(), optional(:id) => String.t(), optional(:name) => String.t() } | Enumerable.t() ) :: SmartCity.Organization
Creates and returns a new SmartCity.AccessGroup
example
create_data(overrides)
View Sourcecreate_data( %{ optional(:dataset_id) => String.t(), optional(:_metadata) => map(), optional(:operational) => map(), optional(:payload) => map() } | Enumerable.t() ) :: SmartCity.Data
Creates and returns a new SmartCity.Data
example
Creates and returns a predefined number of SmartCity.Data
examples
create_dataset(overrides)
View Sourcecreate_dataset( %{ optional(:id) => String.t(), optional(:business) => SmartCity.Dataset.Business, optional(:technical) => SmartCity.Dataset.Technical } | Enumerable.t() ) :: SmartCity.Dataset
Creates and returns a new SmartCity.Dataset
example
create_ingestion(overrides)
View Sourcecreate_ingestion( %{ optional(:id) => String.t(), optional(:allow_duplicates) => boolean(), optional(:cadence) => String.t(), optional(:extractSteps) => [map()], optional(:schema) => [map()], optional(:sourceFormat) => String.t(), optional(:targetDataset) => String.t(), optional(:topLevelSelector) => String.t(), optional(:transformations) => [SmartCity.Ingestion.Transformation.t()] } | Enumerable.t() ) :: SmartCity.Ingestion
Creates and returns a new SmartCity.Ingestion
example
create_organization(overrides)
View Sourcecreate_organization( %{ optional(:description) => String.t(), optional(:homepage) => String.t(), optional(:id) => String.t(), optional(:logoUrl) => String.t(), optional(:orgName) => String.t(), optional(:orgTitle) => String.t(), optional(:dn) => String.t() } | Enumerable.t() ) :: SmartCity.Organization
Creates and returns a new SmartCity.Organization
example
create_transformation(overrides)
View Sourcecreate_transformation( %{optional(:type) => String.t(), optional(:parameters) => map()} | Enumerable.t() ) :: SmartCity.Ingestion.Transformation
Creates and returns a new SmartCity.Ingestion.Transformation
example
create_user(overrides)
View Sourcecreate_user(%{} | Enumberable.t()) :: SmartCity.User
Creates a SmartCity.User with defined overrides. Overrides are a map which can contain the keys: subject_id, email, name. If an override is not provided for a particular property, a random one will be generated.