line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::Cmis::Test::ObjectType; |
2
|
1
|
|
|
1
|
|
567
|
use base qw(WebService::Cmis::Test); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
560
|
|
3
|
|
|
|
|
|
|
use Test::More; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use strict; |
6
|
|
|
|
|
|
|
use warnings; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use Error qw(:try); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub test_ObjectType : Tests { |
11
|
|
|
|
|
|
|
my $this = shift; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $repo = $this->getRepository; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my $typeDefs = $repo->getTypeDefinitions; |
16
|
|
|
|
|
|
|
isa_ok($typeDefs, 'WebService::Cmis::AtomFeed::ObjectTypes'); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
my $size = $typeDefs->getSize; |
19
|
|
|
|
|
|
|
note("found $size type definitions"); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$this->num_tests($size*18+1); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
while (my $objectType = $typeDefs->getNext) { |
24
|
|
|
|
|
|
|
isa_ok($objectType, 'WebService::Cmis::ObjectType'); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
note("attributes=".join(", ", keys %{$objectType->getAttributes})); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
my $id = $objectType->getId; |
29
|
|
|
|
|
|
|
my $displayName = $objectType->getDisplayName; |
30
|
|
|
|
|
|
|
my $description = $objectType->getDescription; |
31
|
|
|
|
|
|
|
my $link = $objectType->getLink; |
32
|
|
|
|
|
|
|
my $baseId = $objectType->getBaseId; |
33
|
|
|
|
|
|
|
my $localName = $objectType->getLocalName; |
34
|
|
|
|
|
|
|
my $localNamespace = $objectType->getLocalNamespace; |
35
|
|
|
|
|
|
|
my $queryName = $objectType->getQueryName; |
36
|
|
|
|
|
|
|
my $contentStreamAllowed = $objectType->getContentStreamAllowed || ''; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $isCreatable = $objectType->isCreatable; |
39
|
|
|
|
|
|
|
my $isFileable = $objectType->isFileable; |
40
|
|
|
|
|
|
|
my $isQueryable = $objectType->isQueryable; |
41
|
|
|
|
|
|
|
my $isFulltextIndexed = $objectType->isFulltextIndexed; |
42
|
|
|
|
|
|
|
my $isIncludedInSupertypeQuery = $objectType->isIncludedInSupertypeQuery; |
43
|
|
|
|
|
|
|
my $isControllablePolicy = $objectType->isControllablePolicy; |
44
|
|
|
|
|
|
|
my $isControllableACL = $objectType->isControllableACL; |
45
|
|
|
|
|
|
|
my $isVersionable = $objectType->isVersionable; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
note("id=$id ($objectType->{attributes}{id}"); |
48
|
|
|
|
|
|
|
note(" displayName=$displayName"); |
49
|
|
|
|
|
|
|
note(" description=$description"); |
50
|
|
|
|
|
|
|
note(" link=$link"); |
51
|
|
|
|
|
|
|
note(" baseId=$baseId"); |
52
|
|
|
|
|
|
|
note(" localName=$localName"); |
53
|
|
|
|
|
|
|
note(" localNamespace=$localNamespace"); |
54
|
|
|
|
|
|
|
note(" queryName=$queryName"); |
55
|
|
|
|
|
|
|
note(" contentStreamAllowed=$contentStreamAllowed"); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
note(" isCreatable=$isCreatable"); |
58
|
|
|
|
|
|
|
note(" isFileable=$isFileable"); |
59
|
|
|
|
|
|
|
note(" isQueryable=$isQueryable"); |
60
|
|
|
|
|
|
|
note(" isFulltextIndexed=$isFulltextIndexed"); |
61
|
|
|
|
|
|
|
note(" isIncludedInSupertypeQuery=$isIncludedInSupertypeQuery"); |
62
|
|
|
|
|
|
|
note(" isControllablePolicy=$isControllablePolicy"); |
63
|
|
|
|
|
|
|
note(" isControllableACL=$isControllableACL"); |
64
|
|
|
|
|
|
|
note(" isVersionable=$isVersionable"); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
$objectType->reload; |
67
|
|
|
|
|
|
|
note("2 - id=".$objectType->getId.", displayName=".$objectType->getDisplayName.", description=".$objectType->getDescription.", link=".$objectType->getLink); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
is($id, $objectType->getId); |
70
|
|
|
|
|
|
|
is($displayName, $objectType->getDisplayName); |
71
|
|
|
|
|
|
|
is($description, $objectType->getDescription); |
72
|
|
|
|
|
|
|
is($link, $objectType->getLink); |
73
|
|
|
|
|
|
|
is($baseId, $objectType->getBaseId); |
74
|
|
|
|
|
|
|
is($localName, $objectType->getLocalName); |
75
|
|
|
|
|
|
|
is($localNamespace, $objectType->getLocalNamespace); |
76
|
|
|
|
|
|
|
is($queryName, $objectType->getQueryName); |
77
|
|
|
|
|
|
|
is($contentStreamAllowed, ($objectType->getContentStreamAllowed||'')); |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
is($isCreatable, $objectType->isCreatable); |
80
|
|
|
|
|
|
|
is($isFileable, $objectType->isFileable); |
81
|
|
|
|
|
|
|
is($isQueryable, $objectType->isQueryable); |
82
|
|
|
|
|
|
|
is($isFulltextIndexed, $objectType->isFulltextIndexed); |
83
|
|
|
|
|
|
|
is($isIncludedInSupertypeQuery, $objectType->isIncludedInSupertypeQuery); |
84
|
|
|
|
|
|
|
is($isControllablePolicy, $objectType->isControllablePolicy); |
85
|
|
|
|
|
|
|
is($isControllableACL, $objectType->isControllableACL); |
86
|
|
|
|
|
|
|
is($isVersionable, $objectType->isVersionable); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
1; |