From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

use strict;
use Test::More 'tests' => 3;
use Unicode::UTF8 qw(decode_utf8);
# Test.
my $obj = MARC::Convert::Wikidata::Object::People->new;
my $ret = $obj->date_of_death;
is($ret, undef, 'Get default date of death.');
# Test.
$obj = MARC::Convert::Wikidata::Object::People->new(
date_of_birth => '1814',
date_of_death => '1883',
name => decode_utf8('Antonín'),
nkcr_aut => 'jk01033252',
surname => 'Halouzka',
);
$ret = $obj->date_of_death;
is($ret, '1883', 'Get explicit date of death.');