Test::Attean::Store::LDF::Role::CreateStore(3pm)

Test::Attean::Store::LDF::Role::CreateStore3pm

Create a ldf store for tests

Usage

Either:

  use Test::More;
  use Test::Roo;
  with 'Test::Attean::TripleStore', 'Test::Attean::Store::LDF::Role::CreateStore';
  run_me;
  done_testing;

or:

  package TestCreateStore {
        use Moo;
        with 'Test::Attean::Store::LDF::Role::CreateStore';
  };
  my $triples = [
                                   triple(iri('http://example.org/bar'), iri('http://example.org/c'), iri('http://example.org/foo')),
               # [...]
                                  ];
  my $test = TestCreateStore->new;
  my $store = $test->create_store(triples => $triples);

Overview

There are two ways of using this. The original idea is to use it to test a triple/quad that uses Test::Attean::TripleStore, like in the first example in the synopsis.

It is also possible to utilize this role like in the second example to create a store for testing other parts of the code too. In that example, first wrap a class around the role, then create an arrayref of triples, which should be used to populate the store. Then, instantiate an object of the class, and call it's "create_store" method with the triples. Now, you have a proper store that can be used in tests.

Releases

5 releases since Debian 9 (Stretch); the text changed 2 times.

  1. 9–10
  2. 11
  3. 12–13

Author

Kjetil Kjernsmo <[email protected]>. Patrick Hochstenbach "<[email protected]>"

From libatteanx-store-ldf-perl 0.04-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.