diff --git a/lib/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee.pm b/lib/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee.pm index 1f4bb71ce..c4fe93f06 100644 --- a/lib/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee.pm +++ b/lib/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee.pm @@ -224,8 +224,8 @@ sub fee_set_parse } elsif ($name eq 'fee') # Fees are kind of loosely defined based on free text description field with refundable also possible. This will total it up and concat the description and refundable fields but its only human readable { - $set->{fee} = 0 unless exists $set->{fee}; - $set->{fee} += $content->textContent(); + $set->{fee} = '0.00' unless exists $set->{fee}; + $set->{fee} = sprintf("%.2f", ($set->{'fee'} + $content->textContent())); # wasn't appending x.00 for some reason. Using this way to avoid such problem :p $set->{description} = '' unless exists $set->{description}; if ($content->hasAttribute('description')) { @@ -233,7 +233,7 @@ sub fee_set_parse my $d = lc $content->getAttribute('description'); $d =~ s/ /_/g; $d = 'early_access_fee' if $d =~ m/early_access/; - $set->{"fee_$d"} = 0 + $content->textContent(); + $set->{"fee_$d"} = $content->textContent(); } if ($content->hasAttribute('refundable') && $content->getAttribute('refundable') eq '1') { $set->{description} .= "Refundable"; #TODO remove in regext-fee (0.12?), the description shold not contain these @@ -536,7 +536,7 @@ sub transform_parse } elsif ($name =~ m/^(fee|balance|creditLimit)/) { my $k= ($1 eq 'creditLimit') ? 'credit_limit' : $1; - $p{$k}=0+$content->textContent(); + $p{$k}=$content->textContent(); } } $rinfo->{domain}->{$oname}->{fee}=\%p; diff --git a/lib/Net/DRI/Protocol/EPP/Extensions/Fee.pm b/lib/Net/DRI/Protocol/EPP/Extensions/Fee.pm index 40e56212f..f0c2f9827 100644 --- a/lib/Net/DRI/Protocol/EPP/Extensions/Fee.pm +++ b/lib/Net/DRI/Protocol/EPP/Extensions/Fee.pm @@ -255,8 +255,8 @@ sub fee_element_parse return unless $content; # Fees are kind of loosely defined based on free text description field with refundable, applied, grace-period also possible. # The main fee is the total of them all, its not necessarily correct, but there you have it. - $set->{fee} = 0 unless exists $set->{fee}; - $set->{fee} += $content->textContent(); + $set->{fee} = '0.00' unless exists $set->{fee}; + $set->{fee} = sprintf("%.2f", ($set->{'fee'} + $content->textContent())); # wasn't appending x.00 for some reason. Using this way to avoid such problem :p my $d = 'default'; if ($content->hasAttribute('description')) { @@ -264,7 +264,7 @@ sub fee_element_parse $d = lc $content->getAttribute('description'); $d =~ s/ /_/g; $d = 'early_access_fee' if $d =~ m/early_access/; - $set->{"fee_$d"} = 0 + $content->textContent(); + $set->{"fee_$d"} = $content->textContent(); $set->{$d}->{description} = $content->getAttribute('description'); push @{$set->{fee_types}}, $d; } @@ -283,7 +283,7 @@ sub fee_element_parse $set->{applied} = $content->getAttribute('applied'); $set->{$d}->{applied} = $content->getAttribute('applied'); } - $set->{$d}->{fee} = 0+$content->textContent(); + $set->{$d}->{fee} = $content->textContent(); return; } @@ -486,7 +486,7 @@ sub transform_parse } elsif ($name =~ m/^(fee|balance|creditLimit|credit)/) { my $k= ($1 eq 'creditLimit') ? 'credit_limit' : $1; - $p{$k}=0+$content->textContent(); + $p{$k}=$content->textContent(); $p{'description'} = $content->getAttribute('description') if $content->hasAttribute('description'); } } diff --git a/t/Net/DRI/Protocol/EPP/Extensions/AFNIC_gTLD.t b/t/Net/DRI/Protocol/EPP/Extensions/AFNIC_gTLD.t index c88a25a85..9c1786be3 100644 --- a/t/Net/DRI/Protocol/EPP/Extensions/AFNIC_gTLD.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/AFNIC_gTLD.t @@ -103,9 +103,9 @@ is($d->{domain},'foobar.paris','domain_check get_info(domain)'); is($d->{price_avail},1,'domain_check parse fee (price_avail)'); is($d->{premium},0,'domain_check parse premium'); is($d->{currency},'USD','domain_check get_info(currency)'); -is($d->{command}->{create}->{fee_registration_fee},10.00,'domain_check get_info(fee_registration_fee)'); -is($d->{command}->{create}->{fee_application_fee},500.00,'domain_check get_info(fee_application_fee)'); -is($d->{command}->{create}->{fee},510.00,'domain_check get_info(fee)'); # fees are added together for the total. this is debateable! +is($d->{command}->{create}->{fee_registration_fee},'10.00','domain_check get_info(fee_registration_fee)'); +is($d->{command}->{create}->{fee_application_fee},'500.00','domain_check get_info(fee_application_fee)'); +is($d->{command}->{create}->{fee},'510.00','domain_check get_info(fee)'); # fees are added together for the total. this is debateable! is($d->{command}->{create}->{description},'Registration Fee (Refundable) (Grace=>P5D),Application Fee (Applied=>immediate)','domain_check get_info(description)'); # descriptions melded into a string is($d->{command}->{create}->{phase},'sunrise','domain_check get_info(phase)'); is($d->{command}->{create}->{sub_phase},undef,'domain_check get_info(sub_phase)'); diff --git a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.11.t b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.11.t index d8ed6fb65..3ca98ed91 100755 --- a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.11.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.11.t @@ -71,9 +71,8 @@ is($d->{action},'create','domain_check multi get_info(action) 1/4'); is($d->{phase},'sunrise','domain_check multi get_info(phase) 1/4'); is($d->{sub_phase},undef,'domain_check multi get_info(sub_phase) 1/4'); #is($d->{duration}->years(),'1','domain_check multi get_info(duration) 1/4'); -is($d->{fee},5.00,'domain_check multi get_info(fee) 1/4'); -#is($d->{fee_application_fee},5.00,'domain_check multi parse fee (fee_application_fee) 1/4'); -is($d->{fee_registration_fee},5.00,'domain_check multi parse fee (fee_registration_fee) 1/4'); +is($d->{fee},'5.00','domain_check multi get_info(fee) 1/4'); +is($d->{fee_registration_fee},'5.00','domain_check multi parse fee (fee_registration_fee) 1/4'); is($d->{grace_period},'P5D','domain_check multi parse fee (grace_period) 1/4'); is($d->{refundable},'1','domain_check multi parse fee (refundable) 1/4'); $d = shift @{$dri->get_info('fee','domain','holidays.space')}; @@ -84,7 +83,7 @@ is($d->{action},'create','domain_check multi get_info(action) 2/4'); is($d->{phase},'claims','domain_check multi get_info(phase) 2/4'); is($d->{sub_phase},'landrush','domain_check multi get_info(sub_phase) 2/4'); is($d->{duration}->years(),'2','domain_check multi get_info(duration) 2/4'); -is($d->{fee},5.00,'domain_check multi get_info(fee) 2/4'); +is($d->{fee},'5.00','domain_check multi get_info(fee) 2/4'); $d = shift @{$dri->get_info('fee','domain','hotels.space')}; is($d->{domain},'hotels.space','domain_check multi get_info(domain) 3/4'); is($d->{premium},0,'domain_check multi parse premium 3/4'); @@ -99,9 +98,9 @@ is($d->{reason},'minimum period is 2 years.','domain_check multi parse fee (reas # Note: we can no longer check different types in one command - so create only here is($dri->get_info('is_premium','domain','hotels.space'),0,'domain_check_multi get_info (is_premium) undef'); is($dri->get_info('price_duration','domain','tourism.space')->years(),1,'domain_check get_info (price_duration)'); -is($dri->get_info('create_price','domain','holidays.space'),5.00,'domain_check_multi get_info (create_price)'); -#is($dri->get_info('transfer_price','domain','hotels.space'),12.50,'domain_check_multi get_info (transfer_price)'); -#is($dri->get_info('restore_price','domain','restaurants.space'),25,'domain_check_multi get_info (restore_price)'); +is($dri->get_info('create_price','domain','holidays.space'),'5.00','domain_check_multi get_info (create_price)'); +#is($dri->get_info('transfer_price','domain','hotels.space'),'12.50','domain_check_multi get_info (transfer_price)'); +#is($dri->get_info('restore_price','domain','restaurants.space'),'25.00','domain_check_multi get_info (restore_price)'); #################################################################################################### ### Copied From fee-0.9 tests an manually adjusted @@ -119,9 +118,9 @@ is($d->{premium},1,'Fee extension: domain_check single parse premium'); is($d->{class},'premium','Fee extension: domain_check single parse class'); is($d->{currency},'EUR','Fee extension: domain_check single parse currency'); is($d->{action},'renew','Fee extension: domain_check single parse action'); -is($d->{duration}->years(),2,'Fee extension: domain_check singe parse duration'); +is($d->{duration}->years(),2,'Fee extension: domain_check single parse duration'); is($d->{grace_period},'P5D','domain_check multi single fee (grace_period) 1/4'); -is($d->{fee},650.00,'Fee extension: domain_check single parse fee'); +is($d->{fee},'650.00','Fee extension: domain_check single parse fee'); $dri->cache_clear(); @@ -137,8 +136,8 @@ is($d->{premium},1,'Fee extension: domain_check_price single parse premium'); is($d->{currency},'USD','Fee extension: domain_check_price single parse currency'); is($d->{action},'create','Fee extension: domain_check_price single parse action'); is($d->{duration}->years(),2,'Fee extension: domain_check_price single parse duration'); -is($d->{fee_registration_fee},5000.00,'Fee extension: domain_check_price single parse fee (fee_registration_fee)'); -is($d->{fee},5000.00,'Fee extension: domain_check_price single parse fee'); +is($d->{fee_registration_fee},'5000.00','Fee extension: domain_check_price single parse fee (fee_registration_fee)'); +is($d->{fee},'5000.00','Fee extension: domain_check_price single parse fee'); is($d->{phase},'sunrise','Fee extension: domain_check_price single parse phase'); # using the standardised methods @@ -148,10 +147,10 @@ isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check get_i is($dri->get_info('price_duration')->years(),2,'domain_check get_info (price_duration)'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_category'),'premium','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),5000,'domain_check get_info (create_price)'); -#is($dri->get_info('renew_price'),9.95,'domain_check get_info (renew_price) undef'); -#is($dri->get_info('transfer_price'),9.95,'domain_check get_info (transfer_price) undef'); -#is($dri->get_info('restore_price'),9.95,'domain_check get_info (restore_price) undef'); +is($dri->get_info('create_price'),'5000.00','domain_check get_info (create_price)'); +#is($dri->get_info('renew_price'),'9.95','domain_check get_info (renew_price) undef'); +#is($dri->get_info('transfer_price'),'9.95','domain_check get_info (transfer_price) undef'); +#is($dri->get_info('restore_price'),'9.95','domain_check get_info (restore_price) undef'); ## domain create $R2=$E1.''.r().'exdomain.space1999-04-03T22:00:00.0Z2001-04-03T22:00:00.0ZUSD15.00-5.001000.00'.$TRID.''.$E2; @@ -167,9 +166,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); #################################################################################################### exit 0; diff --git a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.4.t b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.4.t index 2a4ad1a80..e08a67288 100755 --- a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.4.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.4.t @@ -50,8 +50,8 @@ $d = shift @{$dri->get_info('fee')}; is($d->{domain},'example.wiki','Fee extension: domain_check single parse domain'); is($d->{currency},'EUR','Fee extension: domain_check single parse currency'); is($d->{action},'transfer','Fee extension: domain_check single parse action'); -is($d->{duration}->years(),2,'Fee extension: domain_check singe parse duration'); -is($d->{fee},'2.50','Fee extension: domain_check singe parse fee'); +is($d->{duration}->years(),2,'Fee extension: domain_check single parse duration'); +is($d->{fee},'2.50','Fee extension: domain_check single parse fee'); $R2=$E1.''.r().'example.barIn useexample.barEURcreate25.00'.$TRID.''.$E2; $rc=$dri->domain_check('example.bar',{fee=>{currency=>'EUR',action=>'create',phase=>'claims',sub_phase=>'landrush',duration=>$dri->local_object('duration','years',2)}}); is_string($R1,$E1.'example.barexample.barEURcreate2ABC-12345'.$E2,'Fee extension: domain_check build'); @@ -63,8 +63,8 @@ is($d->{currency},'EUR','Fee extension: domain_check single parse currency'); is($d->{action},'create','Fee extension: domain_check single parse action'); is($d->{phase},'claims','Fee extension: domain_check single parse phase'); is($d->{sub_phase},'landrush','Fee extension: domain_check single parse sub_phase'); -is($d->{duration}->years(),2,'Fee extension: domain_check singe parse duration'); -is($d->{fee},'5.00','Fee extension: domain_check singe parse fee'); +is($d->{duration}->years(),2,'Fee extension: domain_check single parse duration'); +is($d->{fee},'5.00','Fee extension: domain_check single parse fee'); # using the standardised methods is($dri->get_info('is_premium'),undef,'domain_check get_info (is_premium) undef'); # NOT SUPPORTED isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check get_info (price_duration) is DateTime::Duration'); @@ -215,7 +215,7 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); ## Renew $R2=$E1.''.r().'example.space2005-04-03T22:00:00.0ZUSD5.00'.$TRID.''.$E2; @@ -224,7 +224,7 @@ is_string($R1,$E1.'example.spacependingClientX2000-06-08T22:00:00.0ZClientY2000-06-13T22:00:00.0Z2002-09-08T22:00:00.0ZUSD5.00'.$TRID.''.$E2; @@ -233,7 +233,7 @@ is_string($R1,$E1.'is_success(),1,'domain_transfer is is_success'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_transfer parse currency'); -is($d->{fee},5.00,'Fee extension: domain_transfer parse fee'); +is($d->{fee},'5.00','Fee extension: domain_transfer parse fee'); ## Update $R2=$E1.''.r().'USD5.00'.$TRID.''.$E2; @@ -245,7 +245,7 @@ is_string($R1,$E1.'exdom2.broadwayexdom2.broadwayexdom2.broadwayUSDcreate10.0010.00exdom2.broadwayUSDcreate10.001000.00'.$TRID.''.$E2; @@ -90,14 +90,14 @@ is($d1->{domain},'exdom2.broadway','Fee extension: domain_check single parse dom is($d1->{premium},0,'Fee extension: domain_check single parse premium'); is($d1->{currency},'USD','Fee extension: domain_check single parse currency'); is($d1->{action},'create','Fee extension: domain_check single parse action'); -is($d1->{duration}->years(),1,'Fee extension: domain_check singe parse duration'); -is($d1->{fee},10.00,'Fee extension: domain_check singe parse fee'); +is($d1->{duration}->years(),1,'Fee extension: domain_check single parse duration'); +is($d1->{fee},'10.00','Fee extension: domain_check single parse fee'); is($d2->{domain},'exdom2.broadway','Fee extension: domain_check single parse domain'); is($d2->{premium},1,'Fee extension: domain_check single parse premium'); is($d2->{currency},'USD','Fee extension: domain_check single parse currency'); is($d2->{action},'create','Fee extension: domain_check single parse action'); -is($d2->{duration}->years(),1,'Fee extension: domain_check singe parse duration'); -is($d2->{fee},1000.00,'Fee extension: domain_check singe parse fee'); +is($d2->{duration}->years(),1,'Fee extension: domain_check single parse duration'); +is($d2->{fee},'1000.00','Fee extension: domain_check single parse fee'); ## TODO @@ -125,10 +125,10 @@ is($dri->get_info('is_premium'),0,'domain_check_price get_info (is_premium) no') isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check_price get_info (price_duration) is DateTime::Duration'); is($dri->get_info('price_duration')->years(),1,'domain_check_price get_info (price_duration)'); is($dri->get_info('price_currency'),'USD','domain_check_price get_info (price_currency)'); -is($dri->get_info('create_price'),10.00,'domain_check_price get_info (create_price)'); -is($dri->get_info('renew_price'),10.00,'domain_check_price get_info (renew_price)'); -is($dri->get_info('transfer_price'),5,'domain_check_price get_info (transfer_price)'); -is($dri->get_info('restore_price'),20,'domain_check_price get_info (restore_price)'); +is($dri->get_info('create_price'),'10.00','domain_check_price get_info (create_price)'); +is($dri->get_info('renew_price'),'10.00','domain_check_price get_info (renew_price)'); +is($dri->get_info('transfer_price'),'5.00','domain_check_price get_info (transfer_price)'); +is($dri->get_info('restore_price'),'20.00','domain_check_price get_info (restore_price)'); #################################################################################################### ### EPP Info Command ### @@ -145,7 +145,7 @@ is($d->{currency},'USD','Fee extension: domain_info parse currency'); is($d->{action},'create','Fee extension: domain_info parse action'); is($d->{phase},'sunrise','Fee extension: domain_info parse phase'); is($d->{duration}->years(),1,'Fee extension: domain_info parse duration'); -is($d->{fee},10.00,'Fee extension: domain_check parse fee'); +is($d->{fee},'10.00','Fee extension: domain_check parse fee'); ## Transfer query # No examples to test using the RFC as reference (only the command response). @@ -171,9 +171,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); ## Renew $R2=$E1.''.r().'exdomain.broadway2005-04-03T22:00:00.0ZUSD5.00'.$TRID.''.$E2; @@ -182,7 +182,7 @@ is_string($R1,$E1.'exdomain.broadwaypendingClientX2000-06-08T22:00:00.0ZClientY2000-06-13T22:00:00.0Z2002-09-08T22:00:00.0ZUSD5.00'.$TRID.''.$E2; @@ -191,7 +191,7 @@ is_string($R1,$E1.'is_success(),1,'domain_transfer is is_success'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_transfer parse currency'); -is($d->{fee},5.00,'Fee extension: domain_transfer parse fee'); +is($d->{fee},'5.00','Fee extension: domain_transfer parse fee'); ## Update $R2=$E1.''.r().'USD5.00'.$TRID.''.$E2; @@ -203,7 +203,7 @@ is_string($R1,$E1.'expensiveshoes.coIn useexpensiveshoes.coUSDcreate112000.00CO Tier5expensiveshoes.coUSDrenew120.00CO Default Tierexpensiveshoes.coUSDtransfer120.00CO Default Tierexpensiveshoes.coUSDrestore1'.$TRID.''.$E2; @@ -70,16 +70,16 @@ $rc=$dri->domain_check_price('expensiveshoes.co'); is($rc->is_success(),1,'domain_check_price is is_success'); is($dri->get_info('is_premium'),1,'domain_check get_info (is_premium) 1'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),12000,'domain_check get_info (create_price)'); -is($dri->get_info('renew_price'),20,'domain_check get_info (renew_price) 20'); +is($dri->get_info('create_price'),'12000.00','domain_check get_info (create_price)'); +is($dri->get_info('renew_price'),'20.00','domain_check get_info (renew_price) 20'); $R2=$E1.''.r().'ruggedshoes.coIn useruggedshoes.coUSDcreate17000.00CO Tier4ruggedshoes.coUSDrenew120.00CO Default Tierruggedshoes.coUSDtransfer120.00CO Default Tierruggedshoes.coUSDrestore1'.$TRID.''.$E2; $rc=$dri->domain_check_price('ruggedshoes.co'); is($rc->is_success(),1,'domain_check_price is is_success'); is($dri->get_info('is_premium'),1,'domain_check get_info (is_premium) undef'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),7000,'domain_check get_info (create_price)'); -is($dri->get_info('renew_price'),20,'domain_check get_info (renew_price) undef'); +is($dri->get_info('create_price'),'7000.00','domain_check get_info (create_price)'); +is($dri->get_info('renew_price'),'20.00','domain_check get_info (renew_price) undef'); $R2=$E1.''.r().'exdomain.co1999-04-03T22:00:00.0Z2001-04-03T22:00:00.0ZUSD5.00-5.001000.00'.$TRID.''.$E2; $cs=$dri->local_object('contactset'); @@ -95,9 +95,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); # create with multiple fees and 'description', 'refundable', 'grace-period', 'applied'attributes # couldn't find a example on rfc but should be something like this! diff --git a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.7.t b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.7.t index 309aba3f2..43df255a4 100755 --- a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.7.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.7.t @@ -53,12 +53,12 @@ is($d->{domain},'check-claims-landrush.space','Fee extension: domain_check singl is($d->{premium},1,'Fee extension: domain_check single parse premium'); is($d->{currency},'EUR','Fee extension: domain_check single parse currency'); is($d->{action},'create','Fee extension: domain_check single parse action'); -is($d->{duration}->years(),2,'Fee extension: domain_check singe parse duration'); -is($d->{fee_application_fee},150.00,'Fee extension: domain_check singe parse fee (fee_application_fee)'); -is($d->{fee_registration_fee},500.00,'Fee extension: domain_check singe parse fee (fee_registration_fee)'); -is($d->{fee},650.00,'Fee extension: domain_check singe parse fee'); -is($d->{phase},'claims','Fee extension: domain_check singe parse phase'); -is($d->{sub_phase},'landrush','Fee extension: domain_check singe parse sub_phase'); +is($d->{duration}->years(),2,'Fee extension: domain_check single parse duration'); +is($d->{fee_application_fee},'150.00','Fee extension: domain_check single parse fee (fee_application_fee)'); +is($d->{fee_registration_fee},'500.00','Fee extension: domain_check single parse fee (fee_registration_fee)'); +is($d->{fee},'650.00','Fee extension: domain_check single parse fee'); +is($d->{phase},'claims','Fee extension: domain_check single parse phase'); +is($d->{sub_phase},'landrush','Fee extension: domain_check single parse sub_phase'); # domain_check_price $R2=$E1.''.r().'check-sunrise.spacecheck-sunrise.spacecheck-sunrise.spaceUSDcreate15000.00premiumcheck-sunrise.spaceUSDrenew19.95premiumcheck-sunrise.spaceUSDtransfer19.95premiumcheck-sunrise.spaceUSDrestore19.95premium'.$TRID.''.$E2; @@ -72,8 +72,8 @@ is($d->{premium},1,'Fee extension: domain_check_price single parse premium'); is($d->{currency},'USD','Fee extension: domain_check_price single parse currency'); is($d->{action},'create','Fee extension: domain_check_price single parse action'); is($d->{duration}->years(),1,'Fee extension: domain_check_price single parse duration'); -is($d->{fee_registration_fee},5000.00,'Fee extension: domain_check_price single parse fee (fee_registration_fee)'); -is($d->{fee},5000.00,'Fee extension: domain_check_price single parse fee'); +is($d->{fee_registration_fee},'5000.00','Fee extension: domain_check_price single parse fee (fee_registration_fee)'); +is($d->{fee},'5000.00','Fee extension: domain_check_price single parse fee'); is($d->{phase},'sunrise','Fee extension: domain_check_price single parse phase'); # using the standardised methods is($dri->get_info('is_premium'),1,'domain_check get_info (is_premium) undef'); # NOT SUPPORTED @@ -81,10 +81,10 @@ isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check get_i is($dri->get_info('price_duration')->years(),1,'domain_check get_info (price_duration)'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_category'),'premium','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),5000,'domain_check get_info (create_price)'); -is($dri->get_info('renew_price'),9.95,'domain_check get_info (renew_price) undef'); -is($dri->get_info('transfer_price'),9.95,'domain_check get_info (transfer_price) undef'); -is($dri->get_info('restore_price'),9.95,'domain_check get_info (restore_price) undef'); +is($dri->get_info('create_price'),'5000.00','domain_check get_info (create_price)'); +is($dri->get_info('renew_price'),'9.95','domain_check get_info (renew_price) undef'); +is($dri->get_info('transfer_price'),'9.95','domain_check get_info (transfer_price) undef'); +is($dri->get_info('restore_price'),'9.95','domain_check get_info (restore_price) undef'); # domain info $R2=$E1.''.r().'foo.spaceEXAMPLE1-REPjd1234sh8013sh8013ns1.example.comns1.example.netns1.foo.spacens2.foo.spaceClientXClientY1999-04-03T22:00:00.0ZClientX1999-12-03T09:00:00.0Z2005-04-03T22:00:00.0Z2000-04-08T09:00:00.0Z2fooBARUSDcreate110.00premium-tier1'.$TRID.''.$E2; @@ -100,7 +100,7 @@ is($d->{currency},'USD','Fee extension: domain_info parse currency'); is($d->{action},'create','Fee extension: domain_info parse action'); is($d->{phase},'sunrise','Fee extension: domain_info parse phase'); is($d->{duration}->years(),1,'Fee extension: domain_info parse duration'); -is($d->{fee},10.00,'Fee extension: domain_info parse fee'); +is($d->{fee},'10.00','Fee extension: domain_info parse fee'); is($d->{description},'Refundable(Grace=>P5D)(Applied=>immediate)','Fee extension: domain_info parse human-readable description'); is($d->{class},'premium-tier1','Fee extension: domain_info parse classe'); # using the standardised methods @@ -109,7 +109,7 @@ isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check get_i is($dri->get_info('price_duration')->years(),1,'domain_check get_info (price_duration)'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_category'),'premium-tier1','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),'10','domain_check get_info (create_price)'); +is($dri->get_info('create_price'),'10.00','domain_check get_info (create_price)'); is($dri->get_info('renew_price'),undef,'domain_check get_info (renew_price) undef'); is($dri->get_info('transfer_price'),undef,'domain_check get_info (transfer_price) undef'); is($dri->get_info('restore_price'),undef,'domain_check get_info (restore_price) undef'); @@ -128,9 +128,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); #################################################################################################### exit 0; diff --git a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.8.t b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.8.t index 342311ae7..07d7634a3 100755 --- a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.8.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.8.t @@ -43,7 +43,7 @@ is($dri->protocol()->ns()->{fee}->[0],'urn:ietf:params:xml:ns:fee-0.8','Fee 0.8 #################################################################################################### ### check command and response copied draft-brown-epp-fees-05, this is an exactly simulation -$R2=$E1.''.r().'tourism.spaceholidays.spaceIn usehotels.spaceIn usetourism.spaceUSDcreate15.005.00holidays.spaceEURcreate25.00hotels.spaceEURtransfer22.5010.00restaurants.spaceGBPrestore25premium-tier1'.$TRID.''.$E2; +$R2=$E1.''.r().'tourism.spaceholidays.spaceIn usehotels.spaceIn usetourism.spaceUSDcreate15.005.00holidays.spaceEURcreate25.00hotels.spaceEURtransfer22.5010.00restaurants.spaceGBPrestore25.00premium-tier1'.$TRID.''.$E2; @fees = ( { domain=>'tourism.space',currency=>'USD',action=>'create',phase=>'sunrise',duration=>$dri->local_object('duration','years',1) }, { domain=>'holidays.space',currency=>'EUR',action=>'create',phase=>'claims',sub_phase=>'landrush',duration=>$dri->local_object('duration','years',2) }, @@ -65,9 +65,9 @@ is($d->{action},'create','domain_check multi get_info(action) 1/4'); is($d->{phase},'sunrise','domain_check multi get_info(phase) 1/4'); is($d->{sub_phase},undef,'domain_check multi get_info(sub_phase) 1/4'); is($d->{duration}->years(),'1','domain_check multi get_info(duration) 1/4'); -is($d->{fee},10.00,'domain_check multi get_info(fee) 1/4'); -is($d->{fee_application_fee},5.00,'domain_check multi parse fee (fee_application_fee) 1/4'); -is($d->{fee_registration_fee},5.00,'domain_check multi parse fee (fee_registration_fee) 1/4'); +is($d->{fee},'10.00','domain_check multi get_info(fee) 1/4'); +is($d->{fee_application_fee},'5.00','domain_check multi parse fee (fee_application_fee) 1/4'); +is($d->{fee_registration_fee},'5.00','domain_check multi parse fee (fee_registration_fee) 1/4'); $d = shift @{$dri->get_info('fee','domain','holidays.space')}; is($d->{domain},'holidays.space','domain_check multi get_info(domain) 2/4'); is($d->{premium},0,'domain_check multi parse premium 2/4'); @@ -76,30 +76,30 @@ is($d->{action},'create','domain_check multi get_info(action) 2/4'); is($d->{phase},'claims','domain_check multi get_info(phase) 2/4'); is($d->{sub_phase},'landrush','domain_check multi get_info(sub_phase) 2/4'); is($d->{duration}->years(),'2','domain_check multi get_info(duration) 2/4'); -is($d->{fee},5.00,'domain_check multi get_info(fee) 2/4'); +is($d->{fee},'5.00','domain_check multi get_info(fee) 2/4'); $d = shift @{$dri->get_info('fee','domain','hotels.space')}; is($d->{domain},'hotels.space','domain_check multi get_info(domain) 3/4'); is($d->{premium},0,'domain_check multi parse premium 3/4'); is($d->{currency},'EUR','domain_check multi get_info(currency) 3/4'); is($d->{action},'transfer','domain_check multi get_info(action) 3/4'); is($d->{duration}->years(),'2','domain_check multi get_info(duration) 3/4'); -is($d->{fee},12.50,'domain_check multi get_info(fee) 3/4'); -is($d->{fee_transfer_fee},2.50,'domain_check multi parse fee (fee_transfer_fee) 1/4'); -is($d->{fee_renewal_fee},10.00,'domain_check multi parse fee (fee_renewal_fee) 1/4'); +is($d->{fee},'12.50','domain_check multi get_info(fee) 3/4'); +is($d->{fee_transfer_fee},'2.50','domain_check multi parse fee (fee_transfer_fee) 1/4'); +is($d->{fee_renewal_fee},'10.00','domain_check multi parse fee (fee_renewal_fee) 1/4'); $d = shift @{$dri->get_info('fee','domain','restaurants.space')}; is($d->{domain},'restaurants.space','domain_check multi get_info(domain) 4/4'); is($d->{premium},1,'domain_check multi parse premium 4/4'); is($d->{currency},'GBP','domain_check multi get_info(currency) 4/4'); is($d->{action},'restore','domain_check multi get_info(action) 4/4'); -is($d->{fee},25,'domain_check multi get_info(fee) 3/4'); -is($d->{fee_restore_fee},25.00,'domain_check multi parse fee (fee_redstore_fee) 4/4'); +is($d->{fee},'25.00','domain_check multi get_info(fee) 3/4'); +is($d->{fee_restore_fee},'25.00','domain_check multi parse fee (fee_redstore_fee) 4/4'); # using the standardised methods is($dri->get_info('is_premium','domain','hotels.space'),0,'domain_check_multi get_info (is_premium) undef'); is($dri->get_info('price_duration','domain','tourism.space')->years(),1,'domain_check get_info (price_duration)'); -is($dri->get_info('create_price','domain','holidays.space'),5.00,'domain_check_multi get_info (create_price)'); -is($dri->get_info('transfer_price','domain','hotels.space'),12.50,'domain_check_multi get_info (transfer_price)'); -is($dri->get_info('restore_price','domain','restaurants.space'),25,'domain_check_multi get_info (restore_price)'); +is($dri->get_info('create_price','domain','holidays.space'),'5.00','domain_check_multi get_info (create_price)'); +is($dri->get_info('transfer_price','domain','hotels.space'),'12.50','domain_check_multi get_info (transfer_price)'); +is($dri->get_info('restore_price','domain','restaurants.space'),'25.00','domain_check_multi get_info (restore_price)'); #################################################################################################### @@ -116,12 +116,12 @@ is($d->{domain},'check-claims-landrush.space','Fee extension: domain_check singl is($d->{premium},1,'Fee extension: domain_check single parse premium'); is($d->{currency},'EUR','Fee extension: domain_check single parse currency'); is($d->{action},'create','Fee extension: domain_check single parse action'); -is($d->{duration}->years(),2,'Fee extension: domain_check singe parse duration'); -is($d->{fee_application_fee},150.00,'Fee extension: domain_check singe parse fee (fee_application_fee)'); -is($d->{fee_registration_fee},500.00,'Fee extension: domain_check singe parse fee (fee_registration_fee)'); -is($d->{fee},650.00,'Fee extension: domain_check singe parse fee'); -is($d->{phase},'claims','Fee extension: domain_check singe parse phase'); -is($d->{sub_phase},'landrush','Fee extension: domain_check singe parse sub_phase'); +is($d->{duration}->years(),2,'Fee extension: domain_check single parse duration'); +is($d->{fee_application_fee},'150.00','Fee extension: domain_check single parse fee (fee_application_fee)'); +is($d->{fee_registration_fee},'500.00','Fee extension: domain_check single parse fee (fee_registration_fee)'); +is($d->{fee},'650.00','Fee extension: domain_check single parse fee'); +is($d->{phase},'claims','Fee extension: domain_check single parse phase'); +is($d->{sub_phase},'landrush','Fee extension: domain_check single parse sub_phase'); # domain_check_price $R2=$E1.''.r().'check-sunrise.spacecheck-sunrise.spacecheck-sunrise.spaceUSDcreate15000.00premiumcheck-sunrise.spaceUSDrenew19.95premiumcheck-sunrise.spaceUSDtransfer19.95premiumcheck-sunrise.spaceUSDrestore19.95premium'.$TRID.''.$E2; @@ -135,8 +135,8 @@ is($d->{premium},1,'Fee extension: domain_check_price single parse premium'); is($d->{currency},'USD','Fee extension: domain_check_price single parse currency'); is($d->{action},'create','Fee extension: domain_check_price single parse action'); is($d->{duration}->years(),1,'Fee extension: domain_check_price single parse duration'); -is($d->{fee_registration_fee},5000.00,'Fee extension: domain_check_price single parse fee (fee_registration_fee)'); -is($d->{fee},5000.00,'Fee extension: domain_check_price single parse fee'); +is($d->{fee_registration_fee},'5000.00','Fee extension: domain_check_price single parse fee (fee_registration_fee)'); +is($d->{fee},'5000.00','Fee extension: domain_check_price single parse fee'); is($d->{phase},'sunrise','Fee extension: domain_check_price single parse phase'); # using the standardised methods is($dri->get_info('is_premium'),1,'domain_check get_info (is_premium) undef'); # NOT SUPPORTED @@ -144,10 +144,10 @@ isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check get_i is($dri->get_info('price_duration')->years(),1,'domain_check get_info (price_duration)'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_category'),'premium','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),5000,'domain_check get_info (create_price)'); -is($dri->get_info('renew_price'),9.95,'domain_check get_info (renew_price) undef'); -is($dri->get_info('transfer_price'),9.95,'domain_check get_info (transfer_price) undef'); -is($dri->get_info('restore_price'),9.95,'domain_check get_info (restore_price) undef'); +is($dri->get_info('create_price'),'5000.00','domain_check get_info (create_price)'); +is($dri->get_info('renew_price'),'9.95','domain_check get_info (renew_price) undef'); +is($dri->get_info('transfer_price'),'9.95','domain_check get_info (transfer_price) undef'); +is($dri->get_info('restore_price'),'9.95','domain_check get_info (restore_price) undef'); # domain info $R2=$E1.''.r().'foo.spaceEXAMPLE1-REPjd1234sh8013sh8013ns1.tourism.spacens1.holidays.spacens1.foo.spacens2.foo.spaceClientXClientY1999-04-03T22:00:00.0ZClientX1999-12-03T09:00:00.0Z2005-04-03T22:00:00.0Z2000-04-08T09:00:00.0Z2fooBARUSDcreate110.00premium-tier1'.$TRID.''.$E2; @@ -163,7 +163,7 @@ is($d->{currency},'USD','Fee extension: domain_info parse currency'); is($d->{action},'create','Fee extension: domain_info parse action'); is($d->{phase},'sunrise','Fee extension: domain_info parse phase'); is($d->{duration}->years(),1,'Fee extension: domain_info parse duration'); -is($d->{fee},10.00,'Fee extension: domain_info parse fee'); +is($d->{fee},'10.00','Fee extension: domain_info parse fee'); is($d->{description},'Refundable(Grace=>P5D)(Applied=>immediate)','Fee extension: domain_info parse human-readable description'); is($d->{class},'premium-tier1','Fee extension: domain_info parse classe'); # using the standardised methods @@ -172,7 +172,7 @@ isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check get_i is($dri->get_info('price_duration')->years(),1,'domain_check get_info (price_duration)'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_category'),'premium-tier1','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),'10','domain_check get_info (create_price)'); +is($dri->get_info('create_price'),'10.00','domain_check get_info (create_price)'); is($dri->get_info('renew_price'),undef,'domain_check get_info (renew_price) undef'); is($dri->get_info('transfer_price'),undef,'domain_check get_info (transfer_price) undef'); is($dri->get_info('restore_price'),undef,'domain_check get_info (restore_price) undef'); @@ -191,9 +191,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); #################################################################################################### exit 0; diff --git a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.9.t b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.9.t index fbda4ee2f..6fad1f534 100755 --- a/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.9.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/CentralNic/Fee-0.9.t @@ -43,7 +43,7 @@ is($dri->protocol()->ns()->{fee}->[0],'urn:ietf:params:xml:ns:fee-0.9','Fee 0.9 #################################################################################################### ### check command and response copied draft-brown-epp-fees-06 5.1.1 but names changes -$R2=$E1.''.r().'tourism.spaceholidays.spaceIn usehotels.spaceIn usetourism.spaceUSDcreate15.005.00holidays.spaceEURcreate25.00hotels.spaceEURtransfer22.5010.00restaurants.spaceGBPrestore25premium-tier1'.$TRID.''.$E2; +$R2=$E1.''.r().'tourism.spaceholidays.spaceIn usehotels.spaceIn usetourism.spaceUSDcreate15.005.00holidays.spaceEURcreate25.00hotels.spaceEURtransfer22.5010.00restaurants.spaceGBPrestore25.00premium-tier1'.$TRID.''.$E2; @fees = ( { domain=>'tourism.space','element'=>'name',currency=>'USD',action=>'create',phase=>'sunrise',duration=>$dri->local_object('duration','years',1) }, { domain=>'holidays.space',currency=>'EUR',action=>'create',phase=>'claims',sub_phase=>'landrush',duration=>$dri->local_object('duration','years',2) }, @@ -65,9 +65,9 @@ is($d->{action},'create','domain_check multi get_info(action) 1/4'); is($d->{phase},'sunrise','domain_check multi get_info(phase) 1/4'); is($d->{sub_phase},undef,'domain_check multi get_info(sub_phase) 1/4'); is($d->{duration}->years(),'1','domain_check multi get_info(duration) 1/4'); -is($d->{fee},10.00,'domain_check multi get_info(fee) 1/4'); -is($d->{fee_application_fee},5.00,'domain_check multi parse fee (fee_application_fee) 1/4'); -is($d->{fee_registration_fee},5.00,'domain_check multi parse fee (fee_registration_fee) 1/4'); +is($d->{fee},'10.00','domain_check multi get_info(fee) 1/4'); +is($d->{fee_application_fee},'5.00','domain_check multi parse fee (fee_application_fee) 1/4'); +is($d->{fee_registration_fee},'5.00','domain_check multi parse fee (fee_registration_fee) 1/4'); $d = shift @{$dri->get_info('fee','domain','holidays.space')}; is($d->{domain},'holidays.space','domain_check multi get_info(domain) 2/4'); is($d->{premium},0,'domain_check multi parse premium 2/4'); @@ -76,30 +76,30 @@ is($d->{action},'create','domain_check multi get_info(action) 2/4'); is($d->{phase},'claims','domain_check multi get_info(phase) 2/4'); is($d->{sub_phase},'landrush','domain_check multi get_info(sub_phase) 2/4'); is($d->{duration}->years(),'2','domain_check multi get_info(duration) 2/4'); -is($d->{fee},5.00,'domain_check multi get_info(fee) 2/4'); +is($d->{fee},'5.00','domain_check multi get_info(fee) 2/4'); $d = shift @{$dri->get_info('fee','domain','hotels.space')}; is($d->{domain},'hotels.space','domain_check multi get_info(domain) 3/4'); is($d->{premium},0,'domain_check multi parse premium 3/4'); is($d->{currency},'EUR','domain_check multi get_info(currency) 3/4'); is($d->{action},'transfer','domain_check multi get_info(action) 3/4'); is($d->{duration}->years(),'2','domain_check multi get_info(duration) 3/4'); -is($d->{fee},12.50,'domain_check multi get_info(fee) 3/4'); -is($d->{fee_transfer_fee},2.50,'domain_check multi parse fee (fee_transfer_fee) 1/4'); -is($d->{fee_renewal_fee},10.00,'domain_check multi parse fee (fee_renewal_fee) 1/4'); +is($d->{fee},'12.50','domain_check multi get_info(fee) 3/4'); +is($d->{fee_transfer_fee},'2.50','domain_check multi parse fee (fee_transfer_fee) 1/4'); +is($d->{fee_renewal_fee},'10.00','domain_check multi parse fee (fee_renewal_fee) 1/4'); $d = shift @{$dri->get_info('fee','domain','restaurants.space')}; is($d->{domain},'restaurants.space','domain_check multi get_info(domain) 4/4'); is($d->{premium},1,'domain_check multi parse premium 4/4'); is($d->{currency},'GBP','domain_check multi get_info(currency) 4/4'); is($d->{action},'restore','domain_check multi get_info(action) 4/4'); -is($d->{fee},25,'domain_check multi get_info(fee) 3/4'); -is($d->{fee_restore_fee},25.00,'domain_check multi parse fee (fee_redstore_fee) 4/4'); +is($d->{fee},'25.00','domain_check multi get_info(fee) 3/4'); +is($d->{fee_restore_fee},'25.00','domain_check multi parse fee (fee_restore_fee) 4/4'); # using the standardised methods is($dri->get_info('is_premium','domain','hotels.space'),0,'domain_check_multi get_info (is_premium) undef'); is($dri->get_info('price_duration','domain','tourism.space')->years(),1,'domain_check get_info (price_duration)'); -is($dri->get_info('create_price','domain','holidays.space'),5.00,'domain_check_multi get_info (create_price)'); -is($dri->get_info('transfer_price','domain','hotels.space'),12.50,'domain_check_multi get_info (transfer_price)'); -is($dri->get_info('restore_price','domain','restaurants.space'),25,'domain_check_multi get_info (restore_price)'); +is($dri->get_info('create_price','domain','holidays.space'),'5.00','domain_check_multi get_info (create_price)'); +is($dri->get_info('transfer_price','domain','hotels.space'),'12.50','domain_check_multi get_info (transfer_price)'); +is($dri->get_info('restore_price','domain','restaurants.space'),'25.00','domain_check_multi get_info (restore_price)'); #################################################################################################### ### Copied From fee-0.7 tests with only namespace changed @@ -115,12 +115,12 @@ is($d->{domain},'check-claims-landrush.space','Fee extension: domain_check singl is($d->{premium},1,'Fee extension: domain_check single parse premium'); is($d->{currency},'EUR','Fee extension: domain_check single parse currency'); is($d->{action},'create','Fee extension: domain_check single parse action'); -is($d->{duration}->years(),2,'Fee extension: domain_check singe parse duration'); -is($d->{fee_application_fee},150.00,'Fee extension: domain_check singe parse fee (fee_application_fee)'); -is($d->{fee_registration_fee},500.00,'Fee extension: domain_check singe parse fee (fee_registration_fee)'); -is($d->{fee},650.00,'Fee extension: domain_check singe parse fee'); -is($d->{phase},'claims','Fee extension: domain_check singe parse phase'); -is($d->{sub_phase},'landrush','Fee extension: domain_check singe parse sub_phase'); +is($d->{duration}->years(),2,'Fee extension: domain_check single parse duration'); +is($d->{fee_application_fee},'150.00','Fee extension: domain_check single parse fee (fee_application_fee)'); +is($d->{fee_registration_fee},'500.00','Fee extension: domain_check single parse fee (fee_registration_fee)'); +is($d->{fee},'650.00','Fee extension: domain_check single parse fee'); +is($d->{phase},'claims','Fee extension: domain_check single parse phase'); +is($d->{sub_phase},'landrush','Fee extension: domain_check single parse sub_phase'); # domain_check_price $R2=$E1.''.r().'check-sunrise.spacecheck-sunrise.spacecheck-sunrise.spaceUSDcreate15000.00premiumcheck-sunrise.spaceUSDrenew19.95premiumcheck-sunrise.spaceUSDtransfer19.95premiumcheck-sunrise.spaceUSDrestore19.95premium'.$TRID.''.$E2; @@ -134,8 +134,8 @@ is($d->{premium},1,'Fee extension: domain_check_price single parse premium'); is($d->{currency},'USD','Fee extension: domain_check_price single parse currency'); is($d->{action},'create','Fee extension: domain_check_price single parse action'); is($d->{duration}->years(),1,'Fee extension: domain_check_price single parse duration'); -is($d->{fee_registration_fee},5000.00,'Fee extension: domain_check_price single parse fee (fee_registration_fee)'); -is($d->{fee},5000.00,'Fee extension: domain_check_price single parse fee'); +is($d->{fee_registration_fee},'5000.00','Fee extension: domain_check_price single parse fee (fee_registration_fee)'); +is($d->{fee},'5000.00','Fee extension: domain_check_price single parse fee'); is($d->{phase},'sunrise','Fee extension: domain_check_price single parse phase'); # using the standardised methods is($dri->get_info('is_premium'),1,'domain_check get_info (is_premium) undef'); # NOT SUPPORTED @@ -143,10 +143,10 @@ isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check get_i is($dri->get_info('price_duration')->years(),1,'domain_check get_info (price_duration)'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_category'),'premium','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),5000,'domain_check get_info (create_price)'); -is($dri->get_info('renew_price'),9.95,'domain_check get_info (renew_price) undef'); -is($dri->get_info('transfer_price'),9.95,'domain_check get_info (transfer_price) undef'); -is($dri->get_info('restore_price'),9.95,'domain_check get_info (restore_price) undef'); +is($dri->get_info('create_price'),'5000.00','domain_check get_info (create_price)'); +is($dri->get_info('renew_price'),'9.95','domain_check get_info (renew_price) undef'); +is($dri->get_info('transfer_price'),'9.95','domain_check get_info (transfer_price) undef'); +is($dri->get_info('restore_price'),'9.95','domain_check get_info (restore_price) undef'); ## domain create $R2=$E1.''.r().'exdomain.space1999-04-03T22:00:00.0Z2001-04-03T22:00:00.0ZUSD15.00-5.001000.00'.$TRID.''.$E2; @@ -162,9 +162,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); #################################################################################################### exit 0; diff --git a/t/Net/DRI/Protocol/EPP/Extensions/Fee/Fee-0.11.t b/t/Net/DRI/Protocol/EPP/Extensions/Fee/Fee-0.11.t index c9a165ed2..a7e7314ea 100644 --- a/t/Net/DRI/Protocol/EPP/Extensions/Fee/Fee-0.11.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/Fee/Fee-0.11.t @@ -69,9 +69,9 @@ is($d->{action},'create','domain_check multi get_info(action) 1/4'); is($d->{phase},'sunrise','domain_check multi get_info(phase) 1/4'); is($d->{sub_phase},undef,'domain_check multi get_info(sub_phase) 1/4'); is($d->{duration}->years(),'1','domain_check multi get_info(duration) 1/4'); -is($d->{fee},5.00,'domain_check multi get_info(fee) 1/4'); -#is($d->{fee_application_fee},5.00,'domain_check multi parse fee (fee_application_fee) 1/4'); -is($d->{fee_registration_fee},5.00,'domain_check multi parse fee (fee_registration_fee) 1/4'); +is($d->{fee},'5.00','domain_check multi get_info(fee) 1/4'); +#is($d->{fee_application_fee},'5.00','domain_check multi parse fee (fee_application_fee) 1/4'); +is($d->{fee_registration_fee},'5.00','domain_check multi parse fee (fee_registration_fee) 1/4'); is($d->{grace_period},'P5D','domain_check multi parse fee (grace_period) 1/4'); is($d->{refundable},'1','domain_check multi parse fee (refundable) 1/4'); $d = shift @{$dri->get_info('fee','domain','holidays.space')}; @@ -82,7 +82,7 @@ is($d->{action},'create','domain_check multi get_info(action) 2/4'); is($d->{phase},'claims','domain_check multi get_info(phase) 2/4'); is($d->{sub_phase},'landrush','domain_check multi get_info(sub_phase) 2/4'); is($d->{duration}->years(),'2','domain_check multi get_info(duration) 2/4'); -is($d->{fee},5.00,'domain_check multi get_info(fee) 2/4'); +is($d->{fee},'5.00','domain_check multi get_info(fee) 2/4'); $d = shift @{$dri->get_info('fee','domain','hotels.space')}; is($d->{domain},'hotels.space','domain_check multi get_info(domain) 3/4'); is($d->{premium},0,'domain_check multi parse premium 3/4'); @@ -97,9 +97,9 @@ is($d->{reason},'minimum period is 2 years.','domain_check multi parse fee (reas # Note: we can no longer check different types in one command - so create only here is($dri->get_info('is_premium','domain','hotels.space'),0,'domain_check_multi get_info (is_premium) undef'); is($dri->get_info('price_duration','domain','tourism.space')->years(),1,'domain_check get_info (price_duration)'); -is($dri->get_info('create_price','domain','holidays.space'),5.00,'domain_check_multi get_info (create_price)'); -#is($dri->get_info('transfer_price','domain','hotels.space'),12.50,'domain_check_multi get_info (transfer_price)'); -#is($dri->get_info('restore_price','domain','restaurants.space'),25,'domain_check_multi get_info (restore_price)'); +is($dri->get_info('create_price','domain','holidays.space'),'5.00','domain_check_multi get_info (create_price)'); +#is($dri->get_info('transfer_price','domain','hotels.space'),'12.50','domain_check_multi get_info (transfer_price)'); +#is($dri->get_info('restore_price','domain','restaurants.space'),'25.00','domain_check_multi get_info (restore_price)'); #################################################################################################### ### Copied From fee-0.9 tests an manually adjusted @@ -117,9 +117,9 @@ is($d->{premium},1,'Fee extension: domain_check single parse premium'); is($d->{class},'premium','Fee extension: domain_check single parse class'); is($d->{currency},'EUR','Fee extension: domain_check single parse currency'); is($d->{action},'renew','Fee extension: domain_check single parse action'); -is($d->{duration}->years(),2,'Fee extension: domain_check singe parse duration'); +is($d->{duration}->years(),2,'Fee extension: domain_check single parse duration'); is($d->{grace_period},'P5D','domain_check multi single fee (grace_period) 1/4'); -is($d->{fee},650.00,'Fee extension: domain_check single parse fee'); +is($d->{fee},'650.00','Fee extension: domain_check single parse fee'); $dri->cache_clear(); @@ -135,8 +135,8 @@ is($d->{premium},1,'Fee extension: domain_check_price single parse premium'); is($d->{currency},'USD','Fee extension: domain_check_price single parse currency'); is($d->{action},'create','Fee extension: domain_check_price single parse action'); is($d->{duration}->years(),2,'Fee extension: domain_check_price single parse duration'); -is($d->{fee_registration_fee},5000.00,'Fee extension: domain_check_price single parse fee (fee_registration_fee)'); -is($d->{fee},5000.00,'Fee extension: domain_check_price single parse fee'); +is($d->{fee_registration_fee},'5000.00','Fee extension: domain_check_price single parse fee (fee_registration_fee)'); +is($d->{fee},'5000.00','Fee extension: domain_check_price single parse fee'); is($d->{phase},'sunrise','Fee extension: domain_check_price single parse phase'); # using the standardised methods @@ -146,10 +146,10 @@ isa_ok($dri->get_info('price_duration'),'DateTime::Duration','domain_check get_i is($dri->get_info('price_duration')->years(),2,'domain_check get_info (price_duration)'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_category'),'premium','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),5000,'domain_check get_info (create_price)'); -#is($dri->get_info('renew_price'),9.95,'domain_check get_info (renew_price) undef'); -#is($dri->get_info('transfer_price'),9.95,'domain_check get_info (transfer_price) undef'); -#is($dri->get_info('restore_price'),9.95,'domain_check get_info (restore_price) undef'); +is($dri->get_info('create_price'),'5000.00','domain_check get_info (create_price)'); +#is($dri->get_info('renew_price'),'9.95','domain_check get_info (renew_price) undef'); +#is($dri->get_info('transfer_price'),'9.95','domain_check get_info (transfer_price) undef'); +#is($dri->get_info('restore_price'),'9.95','domain_check get_info (restore_price) undef'); ## domain create $R2=$E1.''.r().'exdomain.space1999-04-03T22:00:00.0Z2001-04-03T22:00:00.0ZUSD15.00-5.001000.00'.$TRID.''.$E2; @@ -165,9 +165,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); #################################################################################################### exit 0; diff --git a/t/Net/DRI/Protocol/EPP/Extensions/Fee/Fee-0.21.t b/t/Net/DRI/Protocol/EPP/Extensions/Fee/Fee-0.21.t index abc5cf924..e95cc8755 100644 --- a/t/Net/DRI/Protocol/EPP/Extensions/Fee/Fee-0.21.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/Fee/Fee-0.21.t @@ -79,7 +79,7 @@ is($d->{domain},'explore-0.space','domain_check get_info(domain)'); is($d->{price_avail},1,'domain_check parse fee (price_avail)'); is($d->{premium},0,'domain_check parse premium'); is($d->{currency},'USD','domain_check get_info(currency)'); -is($d->{command}->{create}->{fee},10.00,'domain_check get_info(fee)'); +is($d->{command}->{create}->{fee},'10.00','domain_check get_info(fee)'); is($d->{command}->{create}->{phase},undef,'domain_check get_info(phase)'); is($d->{command}->{create}->{sub_phase},undef,'domain_check get_info(sub_phase)'); is($d->{command}->{create}->{duration}->years(),'2','domain_check get_info(duration)'); @@ -87,7 +87,7 @@ is($d->{command}->{create}->{duration}->years(),'2','domain_check get_info(durat # using the standardised methods is($dri->get_info('is_premium'),0,'domain_checkget_info (is_premium) 0'); is($dri->get_info('price_currency'),'USD','domain_check get_info (price_currency)'); -is($dri->get_info('create_price'),10.00,'domain_check get_info (create_price)'); +is($dri->get_info('create_price'),'10.00','domain_check get_info (create_price)'); ################### ###### domain_check_multi @@ -125,30 +125,30 @@ is($d->{domain},'explore.space','domain_check get_info(domain)'); is($d->{price_avail},1,'domain_check parse fee (price_avail)'); is($d->{premium},0,'domain_check parse premium'); is($d->{currency},'USD','domain_check get_info(currency)'); -is($d->{command}->{create}->{fee},10.00,'domain_check multi get_info(create fee)'); +is($d->{command}->{create}->{fee},'10.00','domain_check multi get_info(create fee)'); is($d->{command}->{create}->{phase},undef,'domain_check multi get_info(create phase)'); is($d->{command}->{create}->{sub_phase},undef,'domain_check multi get_info(create sub_phase)'); is($d->{command}->{create}->{duration}->years(),'2','domain_check multi get_info(create duration)'); -is($d->{command}->{renew}->{fee},5,'domain_check multi get_info(renew fee)'); -is($d->{command}->{transfer}->{fee},5,'domain_check multi get_info(renew fee)'); -is($d->{command}->{restore}->{fee},5,'domain_check multi get_info(restore fee)'); +is($d->{command}->{renew}->{fee},'5.00','domain_check multi get_info(renew fee)'); +is($d->{command}->{transfer}->{fee},'5.00','domain_check multi get_info(renew fee)'); +is($d->{command}->{restore}->{fee},'5.00','domain_check multi get_info(restore fee)'); # using the standardised methods is($dri->get_info('is_premium','domain','explore.space'),0,'domain_check get_info (is_premium) undef'); is($dri->get_info('price_currency','domain','explore.space'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_duration','domain','explore.space')->years(),2,'domain_check get_info (price_currency)'); -is($dri->get_info('create_price','domain','explore.space'),10.00,'domain_check get_info (create_price)'); -is($dri->get_info('renew_price','domain','explore.space'),5.00,'domain_check get_info (renew_price)'); -is($dri->get_info('transfer_price','domain','explore.space'),5.00,'domain_check get_info (transfer_price)'); -is($dri->get_info('restore_price','domain','explore.space'),5.00,'domain_check get_info (restpre_price)'); +is($dri->get_info('create_price','domain','explore.space'),'10.00','domain_check get_info (create_price)'); +is($dri->get_info('renew_price','domain','explore.space'),'5.00','domain_check get_info (renew_price)'); +is($dri->get_info('transfer_price','domain','explore.space'),'5.00','domain_check get_info (transfer_price)'); +is($dri->get_info('restore_price','domain','explore.space'),'5.00','domain_check get_info (restpre_price)'); is($dri->get_info('is_premium','domain','discover.space'),0,'domain_check get_info (is_premium) undef'); is($dri->get_info('price_currency','domain','discover.space'),'USD','domain_check get_info (price_currency)'); is($dri->get_info('price_duration','domain','discover.space')->years(),5,'domain_check get_info (price_currency)'); -is($dri->get_info('create_price','domain','discover.space'),25.00,'domain_check get_info (create_price)'); -is($dri->get_info('renew_price','domain','discover.space'),5.00,'domain_check get_info (renew_price)'); -is($dri->get_info('transfer_price','domain','discover.space'),5.00,'domain_check get_info (transfer_price)'); -is($dri->get_info('restore_price','domain','discover.space'),5.00,'domain_check get_info (restpre_price)'); +is($dri->get_info('create_price','domain','discover.space'),'25.00','domain_check get_info (create_price)'); +is($dri->get_info('renew_price','domain','discover.space'),'5.00','domain_check get_info (renew_price)'); +is($dri->get_info('transfer_price','domain','discover.space'),'5.00','domain_check get_info (transfer_price)'); +is($dri->get_info('restore_price','domain','discover.space'),'5.00','domain_check get_info (restpre_price)'); $d = shift @{$dri->get_info('fee','domain','colonize.space')}; @@ -177,13 +177,13 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); # using the standardised methods is($dri->get_info('price_currency'),'USD','domain_create get_info (price_currency)'); -is($dri->get_info('create_price'),5,'domain_create get_info (create_price)'); +is($dri->get_info('create_price'),'5.00','domain_create get_info (create_price)'); ################### ###### domain_create with multiple fee elements @@ -203,9 +203,9 @@ $rc=$dri->domain_delete('explore.space'); is($rc->is_success(),1,'domain_delete is is_success'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_delete parse currency'); -is($d->{credit},-5.00,'Fee extension: domain_delete parse credit'); +is($d->{credit},'-5.00','Fee extension: domain_delete parse credit'); is($d->{description},'AGP Credit','Fee extension: domain_delete parse credit description'); -is($d->{balance},1005.00,'Fee extension: domain_delete parse balance'); +is($d->{balance},'1005.00','Fee extension: domain_delete parse balance'); ################### @@ -217,11 +217,11 @@ is_string($R1,$E1.'is_success(),1,'domain_transfer is is_success'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_transfer parse currency'); -is($d->{fee},5.00,'Fee extension: domain_transfer parse fee'); +is($d->{fee},'5.00','Fee extension: domain_transfer parse fee'); # using the standardised methods is($dri->get_info('price_currency'),'USD','domain_transfer get_info (price_currency)'); -is($dri->get_info('transfer_price'),5,'domain_transfer get_info (transfer_price)'); +is($dri->get_info('transfer_price'),'5.00','domain_transfer get_info (transfer_price)'); ################### @@ -252,11 +252,11 @@ is_string($R1,$E1.'is_success(),1,'domain_renew is is_success'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_renew parse currency'); -is($d->{fee},5.00,'Fee extension: domain_renew parse fee'); +is($d->{fee},'5.00','Fee extension: domain_renew parse fee'); # using the standardised methods is($dri->get_info('price_currency'),'USD','domain_renew get_info (price_currency)'); -is($dri->get_info('renew_price'),5,'domain_renew get_info (renew_price)'); +is($dri->get_info('renew_price'),'5.00','domain_renew get_info (renew_price)'); @@ -261,11 +261,11 @@ is_string($R1,$E1.'is_success(),1,'domain_transfer is is_success'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_transfer parse currency'); -is($d->{fee},5.00,'Fee extension: domain_transfer parse fee'); +is($d->{fee},'5.00','Fee extension: domain_transfer parse fee'); # using the standardised methods is($dri->get_info('price_currency'),'USD','domain_transfer get_info (price_currency)'); -is($dri->get_info('transfer_price'),5,'domain_transfer get_info (transfer_price)'); +is($dri->get_info('transfer_price'),'5.00','domain_transfer get_info (transfer_price)'); ################### @@ -280,11 +280,11 @@ is_string($R1,$E1.'crrc.in2016-04-11T07:31:58.0Z2017-04-11T07:31:58.0ZINR100.009664204.00'.$TRID.''.$E2; @@ -173,8 +173,8 @@ is($rc->is_success(),1,'fee 0.6 extension: domain_create is is_success'); is($dri->get_info('action'),'create','fee 0.6 extension: domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'INR','fee 0.6 extension: domain_create parse currency'); -is($d->{fee},100.00,'fee 0.6 extension: domain_create parse fee'); -is($d->{balance},9664204.00,'fee 0.6 extension: domain_create parse balance'); +is($d->{fee},'100.00','fee 0.6 extension: domain_create parse fee'); +is($d->{balance},'9664204.00','fee 0.6 extension: domain_create parse balance'); ##################################################################################################### ######### Closing Commands ######## diff --git a/t/Net/DRI/Protocol/EPP/Extensions/KNET.t b/t/Net/DRI/Protocol/EPP/Extensions/KNET.t index 9ce8fefe9..f0886bfca 100644 --- a/t/Net/DRI/Protocol/EPP/Extensions/KNET.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/KNET.t @@ -48,8 +48,8 @@ is($d->{domain},'crrc.top','Fee extension: domain_check single parse domain'); is($d->{premium},1,'Fee extension: domain_check single parse premium'); is($d->{currency},'CNY','Fee extension: domain_check single parse currency'); is($d->{action},'create','Fee extension: domain_check single parse action'); -is($d->{duration}->years(),1,'Fee extension: domain_check singe parse duration'); -is($d->{fee},100.00,'Fee extension: domain_check singe parse fee'); +is($d->{duration}->years(),1,'Fee extension: domain_check single parse duration'); +is($d->{fee},'100.00','Fee extension: domain_check single parse fee'); ## fee-create $R2=$E1.''.r().'crrc.top2016-04-11T07:31:58.0Z2017-04-11T07:31:58.0ZCNY100.009664204.00'.$TRID.''.$E2; @@ -65,8 +65,8 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'CNY','Fee extension: domain_create parse currency'); -is($d->{fee},100.00,'Fee extension: domain_create parse fee'); -is($d->{balance},9664204.00,'Fee extension: domain_create parse balance'); +is($d->{fee},'100.00','Fee extension: domain_create parse fee'); +is($d->{balance},'9664204.00','Fee extension: domain_create parse balance'); #################################################################################################### exit 0; diff --git a/t/Net/DRI/Protocol/EPP/Extensions/Nominet/Amazon.t b/t/Net/DRI/Protocol/EPP/Extensions/Nominet/Amazon.t index 997feb5cc..eb6f8295d 100644 --- a/t/Net/DRI/Protocol/EPP/Extensions/Nominet/Amazon.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/Nominet/Amazon.t @@ -97,9 +97,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); ### # domain check multi - transition from Neustar to Nominet phase 2 diff --git a/t/Net/DRI/Protocol/EPP/Extensions/UniRegistry/DM.t b/t/Net/DRI/Protocol/EPP/Extensions/UniRegistry/DM.t index d7b1cb159..fb0dcac1b 100644 --- a/t/Net/DRI/Protocol/EPP/Extensions/UniRegistry/DM.t +++ b/t/Net/DRI/Protocol/EPP/Extensions/UniRegistry/DM.t @@ -156,9 +156,9 @@ is($rc->is_success(),1,'domain_create is is_success'); is($dri->get_info('action'),'create','domain_create get_info (action)'); $d=$rc->get_data('fee'); is($d->{currency},'USD','Fee extension: domain_create parse currency'); -is($d->{fee},5.00,'Fee extension: domain_create parse fee'); -is($d->{balance},-5.00,'Fee extension: domain_create parse balance'); -is($d->{credit_limit},1000.00,'Fee extension: domain_create parse credit limit'); +is($d->{fee},'5.00','Fee extension: domain_create parse fee'); +is($d->{balance},'-5.00','Fee extension: domain_create parse balance'); +is($d->{credit_limit},'1000.00','Fee extension: domain_create parse credit limit'); #Create Second LVL domain $R2=$E1.''.r().'example3.com.dm2010-08-10T15:38:26.623854Z2012-08-10T15:38:26.623854Z'.$TRID.''.$E2;