Commit | Line | Data |
e3322e16 |
1 | use strict; |
2 | use warnings; |
3 | use Test::More tests => 8; |
4 | |
5 | use XML::Feed; |
6 | use XML::Feed::Entry; |
7 | |
8 | eval { |
9 | XML::Feed::Entry->new('Nofeed'); |
10 | }; |
11 | like $@, qr{Unsupported format Nofeed:}, 'Unsupported format'; |
12 | |
13 | { |
14 | my $rss = XML::Feed::Entry->new('RSS'); |
15 | isa_ok $rss, 'XML::Feed::Entry::Format::RSS'; |
16 | |
17 | my $atom = XML::Feed::Entry->new('Atom'); |
18 | isa_ok $atom, 'XML::Feed::Entry::Format::Atom'; |
19 | |
20 | my $default = XML::Feed::Entry->new(); |
21 | isa_ok $default, 'XML::Feed::Entry::Format::Atom'; |
22 | } |
23 | |
24 | |
25 | eval { |
26 | XML::Feed->new('Nofeed'); |
27 | }; |
28 | like $@, qr{Unsupported format Nofeed:}, 'Unsupported format'; |
29 | |
30 | { |
31 | my $rss = XML::Feed->new('RSS'); |
32 | isa_ok $rss, 'XML::Feed::Format::RSS'; |
33 | |
34 | my $atom = XML::Feed->new('Atom'); |
35 | isa_ok $atom, 'XML::Feed::Format::Atom'; |
36 | |
37 | my $default = XML::Feed->new(); |
38 | isa_ok $default, 'XML::Feed::Format::Atom'; |
39 | } |
40 | |
41 | |