script/14.renew-answer.write.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl
2  
3 BEGIN{push @INC, "./../blib/lib/"}
4  
5 use Biblio::ILL::ISO::RenewAnswer;
6  
7 #
8 # transaction-id
9 #
10 my $tid = new Biblio::ILL::ISO::TransactionId("PLS","001","",
11 new Biblio::ILL::ISO::SystemId("MWPL"));
12  
13 #
14 # service-date-time
15 #
16 my $sdt = new Biblio::ILL::ISO::ServiceDateTime( new Biblio::ILL::ISO::DateTime("20030623","114400"),
17 new Biblio::ILL::ISO::DateTime("20030623","114015")
18 );
19  
20 #
21 # requester-id
22 #
23 my $reqid = new Biblio::ILL::ISO::SystemId();
24 $reqid->set_person_name("David A. Christensen");
25  
26 #
27 # responder-id
28 #
29 my $resid = new Biblio::ILL::ISO::SystemId("MWPL");
30  
31 #
32 # date-due
33 #
34 my $dd = new Biblio::ILL::ISO::DateDue("20030814","true");
35  
36 #
37 # responder-note
38 #
39 my $rn = new Biblio::ILL::ISO::ILLString("This is a responder-note.");
40  
41  
42 #-------------------------------------------------------------------------------------------
43  
44 my $msg = new Biblio::ILL::ISO::RenewAnswer();
45  
46 # Minimum required:
47 $msg->set_protocol_version_num("version-2");
48 $msg->set_transaction_id( $tid );
49 $msg->set_service_date_time( $sdt );
50 $msg->set_answer("true");
51  
52 # Extra, useful info:
53 $msg->set_responder_id( $reqid );
54 $msg->set_responder_id( $resid );
55 $msg->set_date_due( $dd );
56 $msg->set_responder_note( $rn );
57  
58 #
59 #print "\n-as_pretty_string------------------------------------\n";
60 #print $msg->as_pretty_string();
61 #print "\n-----------------------------------------------------\n";
62 #
63 #print "\n-debug(ans->as_asn())--------------------------------\n";
64 #my $href = $msg->as_asn();
65 #print $msg->debug($href);
66 #print "\n-----------------------------------------------------\n";
67 #
68 #$msg->encode();
69 #
70  
71 #print "\n-write-----------------------------------------------\n";
72 $msg->write("msg_14.renew-answer.ber");
73 #print "\n-----------------------------------------------------\n";
74  
75 #print "---end---\n";
76