Simplified test suite
Change-Id: Ibd0d60eead2f3cedfd63e1347c96ca96fb697b40
diff --git a/t/index/base_paragraphs.t b/t/index/base_paragraphs.t
index 2ff64b4..7e606ba 100644
--- a/t/index/base_paragraphs.t
+++ b/t/index/base_paragraphs.t
@@ -3,37 +3,12 @@
use warnings;
use utf8;
use Test::More;
+use lib 't/index';
+use TestInit;
use Scalar::Util qw/weaken/;
use Data::Dumper;
-use_ok('KorAP::Document');
-
-use File::Basename 'dirname';
-use File::Spec::Functions 'catdir';
-
-my $path = catdir(dirname(__FILE__), 'corpus', 'doc', '0001');
-
-ok(my $doc = KorAP::Document->new(
- path => $path . '/'
-), 'Load Korap::Document');
-
-like($doc->path, qr!$path/$!, 'Path');
-ok($doc->parse, 'Parse document');
-
-ok($doc->primary->data, 'Primary data in existence');
-is($doc->primary->data_length, 129, 'Data length');
-
-use_ok('KorAP::Tokenizer');
-
-ok(my $tokens = KorAP::Tokenizer->new(
- path => $doc->path,
- doc => $doc,
- foundry => 'OpenNLP',
- layer => 'Tokens',
- name => 'tokens'
-), 'New Tokenizer');
-
-ok($tokens->parse, 'Parse');
+ok(my $tokens = TestInit::tokens('0001'), 'Parse tokens');
ok($tokens->add('Base', 'Paragraphs'), 'Add Structure');