File: 02_api.t

package info (click to toggle)
libalgorithm-dependency-perl 1.112-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: perl: 499; makefile: 2
file content (60 lines) | stat: -rw-r--r-- 1,215 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# API Testing for Algorithm::Dependency

use strict;
BEGIN {
	$|  = 1;
	$^W = 1;
}

# Load the API we will be testing
use Test::More 'tests' => 39;
use Test::ClassAPI;
use Algorithm::Dependency               ();
use Algorithm::Dependency::Ordered      ();
use Algorithm::Dependency::Source::File ();
use Algorithm::Dependency::Source::HoA  ();

# Execute the tests
Test::ClassAPI->execute('complete');
exit(0);

# Now, define the API for the classes
__DATA__

Algorithm::Dependency=class
Algorithm::Dependency::Item=abstract
Algorithm::Dependency::Ordered=class
Algorithm::Dependency::Source=abstract
Algorithm::Dependency::Source::File=class
Algorithm::Dependency::Source::HoA=class

[Algorithm::Dependency]
new=method
source=method
selected_list=method
selected=method
item=method
depends=method
schedule=method
schedule_all=method

[Algorithm::Dependency::Item]
new=method
id=method
depends=method

[Algorithm::Dependency::Ordered]
Algorithm::Dependency=isa

[Algorithm::Dependency::Source]
new=method
load=method
item=method
items=method
missing_dependencies=method

[Algorithm::Dependency::Source::File]
Algorithm::Dependency::Source=isa

[Algorithm::Dependency::Source::HoA]
Algorithm::Dependency::Source=isa