FixtureMaker

public protocol FixtureMaker

This protocol define a fixture maker.

  • Undocumented

    Declaration

    Swift

    associatedtype Model : FixtureFactoryable
  • Create an array of models.

    Declaration

    Swift

    func make(_ number: Int) -> [Model]

    Parameters

    number

    the number of models to make.

    Return Value

    the array of models.

  • make() Extension method

    Create a model.

    Declaration

    Swift

    public func make() -> Model

    Return Value

    the model.

Available where Model: Object

  • create(_:in:) Extension method

    Make a collection of models and persist them into Realm.

    Declaration

    Swift

    @discardableResult
    public func create(_ number: Int, in realm: Realm) throws -> [Model]

    Parameters

    number

    the number of models to make.

    realm

    the realm the model is saved in.

    Return Value

    the saved models

  • create(in:) Extension method

    Make a single model and persist it into Realm.

    Declaration

    Swift

    @discardableResult
    public func create(in realm: Realm) throws -> Model

    Parameters

    realm

    the realm the model is saved in.

    Return Value

    the saved model.