|
my $obj = MARC::Convert::Wikidata::Object->new;
is( $obj ->full_name, undef , 'Get default full name.' );
$obj = MARC::Convert::Wikidata::Object->new(
'title' => 'Foo' ,
);
is( $obj ->full_name, 'Foo' , 'Get explicit full name (without subtitle).' );
$obj = MARC::Convert::Wikidata::Object->new(
'title' => 'Foo' ,
'subtitles' => [ 'Bar' ],
);
is( $obj ->full_name, 'Foo: Bar' , 'Get explicit full name (one subtitle).' );
$obj = MARC::Convert::Wikidata::Object->new(
'title' => 'Foo' ,
'subtitles' => [ 'Bar' , 'Baz' ],
);
is( $obj ->full_name, 'Foo: Bar: Baz' , 'Get explicit full name (two subtitles).' );
|