File: 011Locale.t

package info (click to toggle)
libnet-amazon-perl 0.35-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 908 kB
  • ctags: 160
  • sloc: xml: 4,821; perl: 2,055; makefile: 46
file content (42 lines) | stat: -rwxr-xr-x 1,247 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

###########################################
# Locale "de" test
# Mike Schilli, 2004 (m@perlmeister.com)
###########################################
use warnings;
use strict;

use Net::Amazon;
use Net::Amazon::Request::ASIN;
use Test::More tests => 5;

################################################################
# Setup
################################################################
  my($TESTDIR) = map { -d $_ ? $_ : () } qw(t ../t .);
  require "$TESTDIR/init.pl";
  my $CANNED = "$TESTDIR/canned";
################################################################
  canned($CANNED, "locale.xml");
################################################################

#use Log::Log4perl qw(:easy);
#Log::Log4perl->easy_init({level => $ERROR, layout => '%F{1}-%L: %m%n'});

my $ua = Net::Amazon->new(
    token         => 'YOUR_AMZN_TOKEN',
    response_dump => 1,
    locale        => 'de',
);

my $resp = $ua->search(
    asin  => "3827313783",
);

my($result) = $resp->properties();

ok($resp->is_success(), "ASIN Fetch successful");
is($result->author(), "Michael Schilli", "Author");
is($result->title(), "Go To Perl 5 .", "Title");
is($result->publisher(), "Addison-Wesley", "Publisher");
is($result->OurPrice(), "EUR 34,95", "Price");