The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
template: info-domain.tt

vars:
  domain_name: cheese.co.te
  pw:

initial_epp_assertions:
  class: SRS::EPP::Command::Info::Domain

SRS:
  - assertions:
      count:
        - [ '/NZSRSRequest/*', 2, 'SRS: Check that there are two requests' ]
        - [ '//Whois', 1, 'SRS: Check for only one Whois' ]
        - [ '//DomainNameFilter', 1, 'SRS: Check for only one DomainNameFilter' ]
      element_is:
        - [ '/NZSRSRequest/*[1]', 'Whois', 'SRS: The first request should be a Whois' ]
        - [ '/NZSRSRequest/*[2]', 'DomainDetailsQry', 'SRS: The second request should be a DomainDetailsQry' ]
      match:
        - [ '//DomainNameFilter', 'cheese.co.te', 'SRS: Check the domain name' ]
      match_all:
      attr_is:

    fake_response: |-
      <NZSRSResponse VerMajor="5" VerMinor="0">
        <Response Action="Whois" FeId="8" FeSeq="4739879" OrigRegistrarId="90" RecipientRegistrarId="90">
          <FeTimeStamp Day="23" Hour="14" Minute="49" Month="6" Second="20" TimeZoneOffset="+12:00" Year="2010"/>
          <Domain DomainName="cheese.co.te" Status="Active"/>
        </Response>
        <Response Action="DomainDetailsQry" FeId="8" FeSeq="4739999" OrigRegistrarId="1" RecipientRegistrarId="1" Rows="1">
          <FeTimeStamp Day="23" Hour="17" Minute="29" Month="6" Second="44" TimeZoneOffset="+12:00" Year="2010"/>
        </Response>
      </NZSRSResponse>

epp_assertions:
  count:
    - [ '//epp:resData', 0, 'EPP: No resData in the response' ]
  match:
    - [ '//epp:msg', 'Authorization error', 'EPP: Check response message' ]
  match_all:
  attr_is:
    - [ '//epp:result', 'code', 2201, 'EPP: Failure = Authorization error' ]