WebService-Yahoo-BOSS
view release on metacpan or search on metacpan
#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
my $boss = require 't/prologue.pl';
is $boss->http_response, undef;
my $search = $boss->Web( q => 'sushi' );
isa_ok( $search, 'WebService::Yahoo::BOSS::Response' );
isa_ok( $search->results->[0], 'WebService::Yahoo::BOSS::Response::Web');
ok $boss->http_response;
is $boss->http_response->code, 200;
t/20-placefinder.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Test::Most;
my $boss = require 't/prologue.pl';
my $search = $boss->PlaceFinder( q => '701 First Ave, Sunnyvale, CA' );
ok $search->count, 'has count';
is @{ $search->results }, $search->count, 'count matches';
isa_ok( $search->results->[0], 'WebService::Yahoo::BOSS::Response::PlaceFinder');
for my $flag (qw(B D Q R T U W X)) {
ok $boss->PlaceFinder( q => '701 First Ave, Sunnyvale, CA', flags => $flag),
"search with flag $flag";
}
( run in 0.274 second using v1.01-cache-2.11-cpan-05444aca049 )