#!/usr/bin/perl -w

use Test::More tests => 4;
require WWW::Yahoo::Credentials;

eval {
    my $credentials = WWW::Yahoo::Credentials->new( 't/files/nouserid.xml' );
};
isa_ok( $@, 'WWW::Yahoo::Credentials::Exception::Syntax', 'no userid' );
like( $@, qr!userid not defined!, 'no userid' );

eval {
    my $credentials = WWW::Yahoo::Credentials->new( 't/files/repeat.xml' );
};
isa_ok( $@, 'WWW::Yahoo::Credentials::Exception::Syntax', 'repeat userid' );
like( $@, qr!userid defined again!, 'repeat userid' );
