#!perl -w
use strict;
use Data::Microformat::hCard::organization;
use Test::More tests => 9;
my $simple = << 'EOF';
Zaphod for President
Dirty Tricks
EOF
ok(my $org = Data::Microformat::hCard::organization->parse($simple));
is($org->organization_name, "Zaphod for President");
is($org->organization_unit, "Dirty Tricks");
my $comparison = << 'EOF';
Zaphod for President
Dirty Tricks
EOF
is($org->to_hcard, $comparison);
my $text_comparison = << 'EOF';
org:
organization-name: Zaphod for President
organization-unit: Dirty Tricks
EOF
is($org->to_text, $text_comparison);
my $medium = << 'EOF';
Zaphod for President
EOF
ok($org = Data::Microformat::hCard::organization->parse($medium));
is($org->organization_name, "Zaphod for President");
$comparison = << 'EOF';
EOF
is($org->to_hcard, $comparison);
$text_comparison = << 'EOF';
org:
organization-name: Zaphod for President
EOF
is($org->to_text, $text_comparison);