Access/stubs.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 6 totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
set_read_data
2.0
start
2.0
disconnect
2.0
CRAP 2.0
1 #
2 # $Id: stubs.pm,v 1.4 2003/03/02 11:12:10 dsw Exp $
3 #
4 # COPYRIGHT AND LICENSE
5 # Copyright (c) 2001-2003, Juniper Networks, Inc.
6 # All rights reserved.
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are
9 # met:
10 # 1. Redistributions of source code must retain the above
11 # copyright notice, this list of conditions and the following
12 # disclaimer.
13 # 2. Redistributions in binary form must reproduce the above
14 # copyright notice, this list of conditions and the following disclaimer
15 # in the documentation and/or other materials provided with the
16 # distribution.
17 # 3. The name of the copyright owner may not be used to
18 # endorse or promote products derived from this software without specific
19 # prior written permission.
20 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 # DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
24 # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28 # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29 # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 # POSSIBILITY OF SUCH DAMAGE.
31 #
32  
33 package JUNOS::Access::stubs;
34  
35 use JUNOS::Trace;
36 use JUNOS::Access;
37 @ISA = qw(JUNOS::Access);
38  
39 sub set_read_data {
40 @read_data = @_;
41 }
42  
43 sub start
44 {
45 1;
46 }
47  
48 sub disconnect
49 {
50 1;
51 }
52  
53 sub recv
54 {
55 tracept("Access");
56 shift @read_data;
57 }
58  
59 sub send
60 {
61 shift;
62 trace("Access", "Access::send: ", @_);
63 }
64  
65 sub eof
66 {
67 tracept("Access");
68 return $#read_data < 0;
69 }
70  
71 1;
72  
73 __END__