2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file TestSuite02.cpp
20 * @brief Test cases for Attribute class.
24 #include <dpl/log/log.h>
25 #include <dpl/test/test_runner.h>
27 #include <dpl/ace/Attribute.h>
28 #include <dpl/ace-dao-ro/BaseAttribute.h>
30 #include <dpl/ace/PolicyEvaluator.h>
32 #include "PEPSingleton.h"
34 #define POLICY_ATTR_EXAMPLE "/usr/etc/ace/attr_policy-example.xml"
35 #define POLICY_ATTR_EXAMPLE1 "/usr/etc/ace/attr_policy-example1.xml"
36 #define POLICY_ATTR_EXAMPLE2 "/usr/etc/ace/attr_policy-example2.xml"
37 #define POLICY_ATTR_EXAMPLE3 "/usr/etc/ace/attr_policy-example3.xml"
38 #define POLICY_ATTR_EXAMPLE4 "/usr/etc/ace/attr_policy-example4.xml"
39 #define POLICY_ATTR_EXAMPLE5 "/usr/etc/ace/attr_policy-example5.xml"
40 #define POLICY_ATTR_EXAMPLE6 "/usr/etc/ace/attr_policy-example6.xml"
41 #define POLICY_ATTR_EXAMPLE7 "/usr/etc/ace/attr_policy-example7.xml"
42 #define POLICY_ATTR_EXAMPLE8 "/usr/etc/ace/attr_policy-example8.xml"
46 if (PEPSingleton::Instance().getPdp()->getCurrentPolicy() != (d)) { \
47 PEPSingleton::Instance().getPdp()->updatePolicy(d); \
51 #define PEPTR PEPSingleton::Instance().getPdp()
53 #define TESTSUITE02(n) \
54 RUNNER_TEST(ts02_extract_attributes_tests_ ## n)
56 using namespace AceDB;
58 bool AttrEqual(const AttributeSet &actual, AttributeSet * expected)
61 for (AttributeSet::const_iterator ita = actual.begin();
66 for (AttributeSet::const_iterator ite = expected->begin();
67 ite != expected->end();
70 if ((*(*ita)->getName() == *(*ite)->getName()) &&
71 ((*ita)->getType() == (*ite)->getType()))
78 LogError("Not found " <<
80 " " << static_cast<int>((*ita)->getType()));
88 CLEANENV(POLICY_ATTR_EXAMPLE);
91 std::string n1("name");
92 BaseAttributePtr a1(new Attribute(&n1,
93 Attribute::Match::Equal,
94 Attribute::Type::Subject));
98 std::string n2("resource-id");
99 BaseAttributePtr a2(new Attribute(&n2,
100 Attribute::Match::Equal,
101 Attribute::Type::Resource));
104 PEPTR->extractAttributesTest();
106 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
107 RUNNER_ASSERT(result);
111 CLEANENV(POLICY_ATTR_EXAMPLE1);
113 AttributeSet attrSet;
115 std::string n3("uri.host");
116 BaseAttributePtr a3(new Attribute(&n3,
117 Attribute::Match::Equal,
118 Attribute::Type::Subject));
121 std::string n4("key-root-trust");
122 BaseAttributePtr a4(new Attribute(&n4,
123 Attribute::Match::Equal,
124 Attribute::Type::Subject));
127 std::string n5("id");
128 BaseAttributePtr a5(new Attribute(&n5,
129 Attribute::Match::Equal,
130 Attribute::Type::Subject));
133 std::string n6("signer-id");
134 BaseAttributePtr a6(new Attribute(&n6,
135 Attribute::Match::Equal,
136 Attribute::Type::Subject));
139 std::string n7("version");
140 BaseAttributePtr a7(new Attribute(&n7,
141 Attribute::Match::Equal,
142 Attribute::Type::Subject));
145 std::string n8("r8v2");
146 BaseAttributePtr a8(new Attribute(&n8,
147 Attribute::Match::Equal,
148 Attribute::Type::Resource));
151 std::string n9("author");
152 BaseAttributePtr a9(new Attribute(&n9,
153 Attribute::Match::Equal,
154 Attribute::Type::Resource));
157 std::string n10("r9a.scheme");
158 BaseAttributePtr a10(new Attribute(&n10,
159 Attribute::Match::Equal,
160 Attribute::Type::Resource));
163 std::string n11("r9b.authority");
164 BaseAttributePtr a11(new Attribute(&n11,
165 Attribute::Match::Equal,
166 Attribute::Type::Resource));
169 std::string n12("r9c.scheme-authority");
170 BaseAttributePtr a12(new Attribute(&n12,
171 Attribute::Match::Equal,
172 Attribute::Type::Resource));
175 PEPTR->extractAttributesTest();
177 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
178 RUNNER_ASSERT(result);
182 CLEANENV(POLICY_ATTR_EXAMPLE2);
184 AttributeSet attrSet;
186 std::string n1("id");
187 BaseAttributePtr a1(new Attribute(&n1,
188 Attribute::Match::Equal,
189 Attribute::Type::Subject));
192 std::string n3("version");
193 BaseAttributePtr a3(new Attribute(&n3,
194 Attribute::Match::Equal,
195 Attribute::Type::Subject));
198 std::string n2("resource-id");
199 BaseAttributePtr a2(new Attribute(&n2,
200 Attribute::Match::Equal,
201 Attribute::Type::Resource));
204 std::string n4("author");
205 BaseAttributePtr a4(new Attribute(&n4,
206 Attribute::Match::Equal,
207 Attribute::Type::Resource));
210 PEPTR->extractAttributesTest();
212 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
213 RUNNER_ASSERT(result);
217 CLEANENV(POLICY_ATTR_EXAMPLE3);
219 AttributeSet attrSet;
221 std::string n1("id");
222 BaseAttributePtr a1(new Attribute(&n1,
223 Attribute::Match::Equal,
224 Attribute::Type::Subject));
227 std::string n3("version");
228 BaseAttributePtr a3(new Attribute(&n3,
229 Attribute::Match::Equal,
230 Attribute::Type::Subject));
233 std::string n2("resource-id");
234 BaseAttributePtr a2(new Attribute(&n2,
235 Attribute::Match::Equal,
236 Attribute::Type::Resource));
239 std::string n4("author");
240 BaseAttributePtr a4(new Attribute(&n4,
241 Attribute::Match::Equal,
242 Attribute::Type::Resource));
245 PEPTR->extractAttributesTest();
247 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
248 RUNNER_ASSERT(result);
252 CLEANENV(POLICY_ATTR_EXAMPLE4);
254 AttributeSet attrSet;
256 std::string n1("id");
257 BaseAttributePtr a1(new Attribute(&n1,
258 Attribute::Match::Equal,
259 Attribute::Type::Subject));
262 std::string n3("version");
263 BaseAttributePtr a3(new Attribute(&n3,
264 Attribute::Match::Equal,
265 Attribute::Type::Subject));
269 std::string n2("resource-id");
270 BaseAttributePtr a2(new Attribute(&n2,
271 Attribute::Match::Equal,
272 Attribute::Type::Resource));
275 std::string n4("author");
276 BaseAttributePtr a4(new Attribute(&n4,
277 Attribute::Match::Equal,
278 Attribute::Type::Resource));
281 std::string n5("author");
282 BaseAttributePtr a5(new Attribute(&n5,
283 Attribute::Match::Equal,
284 Attribute::Type::Environment));
287 std::string n6("version");
288 BaseAttributePtr a6(new Attribute(&n6,
289 Attribute::Match::Equal,
290 Attribute::Type::Environment));
293 std::string n7("ver");
294 BaseAttributePtr a7(new Attribute(&n7,
295 Attribute::Match::Equal,
296 Attribute::Type::Environment));
299 PEPTR->extractAttributesTest();
301 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
302 RUNNER_ASSERT(result);
306 CLEANENV(POLICY_ATTR_EXAMPLE5);
308 AttributeSet attrSet;
310 std::string n3("uri.host");
311 BaseAttributePtr a3(new Attribute(&n3,
312 Attribute::Match::Equal,
313 Attribute::Type::Subject));
316 std::string n4("key-root-trust");
317 BaseAttributePtr a4(new Attribute(&n4,
318 Attribute::Match::Equal,
319 Attribute::Type::Subject));
322 std::string n5("id");
323 BaseAttributePtr a5(new Attribute(&n5,
324 Attribute::Match::Equal,
325 Attribute::Type::Subject));
328 std::string n6("signer-id");
329 BaseAttributePtr a6(new Attribute(&n6,
330 Attribute::Match::Equal,
331 Attribute::Type::Subject));
334 std::string n7("version");
335 BaseAttributePtr a7(new Attribute(&n7,
336 Attribute::Match::Equal,
337 Attribute::Type::Subject));
340 std::string n13("name");
341 BaseAttributePtr a13(new Attribute(&n13,
342 Attribute::Match::Equal,
343 Attribute::Type::Subject));
346 std::string n14("resource-id");
347 BaseAttributePtr a14(new Attribute(&n14,
348 Attribute::Match::Equal,
349 Attribute::Type::Subject));
352 std::string n15("r8v2");
353 BaseAttributePtr a15(new Attribute(&n15,
354 Attribute::Match::Equal,
355 Attribute::Type::Subject));
358 std::string n16("author");
359 BaseAttributePtr a16(new Attribute(&n16,
360 Attribute::Match::Equal,
361 Attribute::Type::Subject));
364 std::string n17("r9a.scheme");
365 BaseAttributePtr a17(new Attribute(&n17,
366 Attribute::Match::Equal,
367 Attribute::Type::Subject));
370 std::string n18("r9b.authority");
371 BaseAttributePtr a18(new Attribute(&n18,
372 Attribute::Match::Equal,
373 Attribute::Type::Subject));
376 std::string n19("r9c.scheme-authority");
377 BaseAttributePtr a19(new Attribute(&n19,
378 Attribute::Match::Equal,
379 Attribute::Type::Subject));
382 std::string n20("resource-id");
383 BaseAttributePtr a20(new Attribute(&n20,
384 Attribute::Match::Equal,
385 Attribute::Type::Resource));
388 std::string n8("r8v2");
389 BaseAttributePtr a8(new Attribute(&n8,
390 Attribute::Match::Equal,
391 Attribute::Type::Resource));
394 std::string n9("author");
395 BaseAttributePtr a9(new Attribute(&n9,
396 Attribute::Match::Equal,
397 Attribute::Type::Resource));
400 std::string n10("r9a.scheme");
401 BaseAttributePtr a10(new Attribute(&n10,
402 Attribute::Match::Equal,
403 Attribute::Type::Resource));
406 std::string n11("r9b.authority");
407 BaseAttributePtr a11(new Attribute(&n11,
408 Attribute::Match::Equal,
409 Attribute::Type::Resource));
412 std::string n12("r9c.scheme-authority");
413 BaseAttributePtr a12(new Attribute(&n12,
414 Attribute::Match::Equal,
415 Attribute::Type::Resource));
418 std::string n21("resource-id");
419 BaseAttributePtr a21(new Attribute(&n21,
420 Attribute::Match::Equal,
421 Attribute::Type::Environment));
424 std::string n22("r8v2");
425 BaseAttributePtr a22(new Attribute(&n22,
426 Attribute::Match::Equal,
427 Attribute::Type::Environment));
430 std::string n23("author");
431 BaseAttributePtr a23(new Attribute(&n23,
432 Attribute::Match::Equal,
433 Attribute::Type::Environment));
436 std::string n24("r9a.scheme");
437 BaseAttributePtr a24(new Attribute(&n24,
438 Attribute::Match::Equal,
439 Attribute::Type::Environment));
442 std::string n25("r9b.authority");
443 BaseAttributePtr a25(new Attribute(&n25,
444 Attribute::Match::Equal,
445 Attribute::Type::Environment));
448 std::string n26("r9c.scheme-authority");
449 BaseAttributePtr a26(new Attribute(&n26,
450 Attribute::Match::Equal,
451 Attribute::Type::Environment));
454 PEPTR->extractAttributesTest();
456 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
457 RUNNER_ASSERT(result);
461 CLEANENV(POLICY_ATTR_EXAMPLE6);
463 AttributeSet attrSet;
465 std::string n3("s-uri.host");
466 BaseAttributePtr a3(new Attribute(&n3,
467 Attribute::Match::Equal,
468 Attribute::Type::Subject));
471 std::string n4("s-key-root-trust");
472 BaseAttributePtr a4(new Attribute(&n4,
473 Attribute::Match::Equal,
474 Attribute::Type::Subject));
477 std::string n5("s-id");
478 BaseAttributePtr a5(new Attribute(&n5,
479 Attribute::Match::Equal,
480 Attribute::Type::Subject));
483 std::string n6("s-signer-id");
484 BaseAttributePtr a6(new Attribute(&n6,
485 Attribute::Match::Equal,
486 Attribute::Type::Subject));
489 std::string n7("s-version");
490 BaseAttributePtr a7(new Attribute(&n7,
491 Attribute::Match::Equal,
492 Attribute::Type::Subject));
495 std::string n13("s-name");
496 BaseAttributePtr a13(new Attribute(&n13,
497 Attribute::Match::Equal,
498 Attribute::Type::Subject));
501 std::string n14("s-resource-id");
502 BaseAttributePtr a14(new Attribute(&n14,
503 Attribute::Match::Equal,
504 Attribute::Type::Subject));
507 std::string n15("s-r8v2");
508 BaseAttributePtr a15(new Attribute(&n15,
509 Attribute::Match::Equal,
510 Attribute::Type::Subject));
513 std::string n16("s-author");
514 BaseAttributePtr a16(new Attribute(&n16,
515 Attribute::Match::Equal,
516 Attribute::Type::Subject));
519 std::string n17("s-r9a.scheme");
520 BaseAttributePtr a17(new Attribute(&n17,
521 Attribute::Match::Equal,
522 Attribute::Type::Subject));
525 std::string n18("s-r9b.authority");
526 BaseAttributePtr a18(new Attribute(&n18,
527 Attribute::Match::Equal,
528 Attribute::Type::Subject));
531 std::string n19("s-r9c.scheme-authority");
532 BaseAttributePtr a19(new Attribute(&n19,
533 Attribute::Match::Equal,
534 Attribute::Type::Subject));
537 std::string n20("r-resource-id");
538 BaseAttributePtr a20(new Attribute(&n20,
539 Attribute::Match::Equal,
540 Attribute::Type::Resource));
543 std::string n8("r-r8v2");
544 BaseAttributePtr a8(new Attribute(&n8,
545 Attribute::Match::Equal,
546 Attribute::Type::Resource));
549 std::string n9("r-author");
550 BaseAttributePtr a9(new Attribute(&n9,
551 Attribute::Match::Equal,
552 Attribute::Type::Resource));
555 std::string n10("r-r9a.scheme");
556 BaseAttributePtr a10(new Attribute(&n10,
557 Attribute::Match::Equal,
558 Attribute::Type::Resource));
561 std::string n11("r-r9b.authority");
562 BaseAttributePtr a11(new Attribute(&n11,
563 Attribute::Match::Equal,
564 Attribute::Type::Resource));
567 std::string n12("r-r9c.scheme-authority");
568 BaseAttributePtr a12(new Attribute(&n12,
569 Attribute::Match::Equal,
570 Attribute::Type::Resource));
573 std::string n21("e-resource-id");
574 BaseAttributePtr a21(new Attribute(&n21,
575 Attribute::Match::Equal,
576 Attribute::Type::Environment));
579 std::string n22("e-r8v2");
580 BaseAttributePtr a22(new Attribute(&n22,
581 Attribute::Match::Equal,
582 Attribute::Type::Environment));
585 std::string n23("e-author");
586 BaseAttributePtr a23(new Attribute(&n23,
587 Attribute::Match::Equal,
588 Attribute::Type::Environment));
591 std::string n24("e-r9a.scheme");
592 BaseAttributePtr a24(new Attribute(&n24,
593 Attribute::Match::Equal,
594 Attribute::Type::Environment));
597 std::string n25("e-r9b.authority");
598 BaseAttributePtr a25(new Attribute(&n25,
599 Attribute::Match::Equal,
600 Attribute::Type::Environment));
603 std::string n26("e-r9c.scheme-authority");
604 BaseAttributePtr a26(new Attribute(&n26,
605 Attribute::Match::Equal,
606 Attribute::Type::Environment));
609 PEPTR->extractAttributesTest();
611 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
612 RUNNER_ASSERT(result);
616 CLEANENV(POLICY_ATTR_EXAMPLE2);
618 AttributeSet attrSet;
620 std::string n1("id");
621 BaseAttributePtr a1(new Attribute(&n1,
622 Attribute::Match::Glob,
623 Attribute::Type::Subject));
626 std::string n3("version");
627 BaseAttributePtr a3(new Attribute(&n3,
628 Attribute::Match::Glob,
629 Attribute::Type::Subject));
633 std::string n2("resource-id");
634 BaseAttributePtr a2(new Attribute(&n2,
635 Attribute::Match::Glob,
636 Attribute::Type::Resource));
639 std::string n4("author");
640 BaseAttributePtr a4(new Attribute(&n4,
641 Attribute::Match::Glob,
642 Attribute::Type::Resource));
645 PEPTR->extractAttributesTest();
647 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
648 RUNNER_ASSERT(result);
652 CLEANENV(POLICY_ATTR_EXAMPLE2);
654 AttributeSet attrSet;
656 std::string n1("id");
657 BaseAttributePtr a1(new Attribute(&n1,
658 Attribute::Match::Regexp,
659 Attribute::Type::Subject));
662 std::string n3("version");
663 BaseAttributePtr a3(new Attribute(&n3,
664 Attribute::Match::Regexp,
665 Attribute::Type::Subject));
669 std::string n2("resource-id");
670 BaseAttributePtr a2(new Attribute(&n2,
671 Attribute::Match::Regexp,
672 Attribute::Type::Resource));
675 std::string n4("author");
676 BaseAttributePtr a4(new Attribute(&n4,
677 Attribute::Match::Regexp,
678 Attribute::Type::Resource));
681 PEPTR->extractAttributesTest();
683 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
684 RUNNER_ASSERT(result);
688 CLEANENV(POLICY_ATTR_EXAMPLE2);
690 AttributeSet attrSet;
692 std::string n1("id");
693 BaseAttributePtr a1(new Attribute(&n1,
694 Attribute::Match::Regexp,
695 Attribute::Type::Subject));
698 std::string n3("version");
699 BaseAttributePtr a3(new Attribute(&n3,
700 Attribute::Match::Equal,
701 Attribute::Type::Subject));
705 std::string n2("resource-id");
706 BaseAttributePtr a2(new Attribute(&n2,
707 Attribute::Match::Glob,
708 Attribute::Type::Resource));
711 std::string n4("author");
712 BaseAttributePtr a4(new Attribute(&n4,
713 Attribute::Match::Regexp,
714 Attribute::Type::Resource));
717 PEPTR->extractAttributesTest();
719 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
720 RUNNER_ASSERT(result);
724 CLEANENV(POLICY_ATTR_EXAMPLE7);
726 AttributeSet attrSet;
728 std::string n3("uri.host");
729 BaseAttributePtr a3(new Attribute(&n3,
730 Attribute::Match::Equal,
731 Attribute::Type::Subject));
734 std::string n4("key-root-trust");
735 BaseAttributePtr a4(new Attribute(&n4,
736 Attribute::Match::Equal,
737 Attribute::Type::Subject));
740 std::string n5("id");
741 BaseAttributePtr a5(new Attribute(&n5,
742 Attribute::Match::Equal,
743 Attribute::Type::Subject));
746 std::string n6("signer-id");
747 BaseAttributePtr a6(new Attribute(&n6,
748 Attribute::Match::Equal,
749 Attribute::Type::Subject));
752 std::string n7("version");
753 BaseAttributePtr a7(new Attribute(&n7,
754 Attribute::Match::Equal,
755 Attribute::Type::Subject));
758 std::string n13("name");
759 BaseAttributePtr a13(new Attribute(&n13,
760 Attribute::Match::Equal,
761 Attribute::Type::Subject));
764 std::string n14("resource-id");
765 BaseAttributePtr a14(new Attribute(&n14,
766 Attribute::Match::Equal,
767 Attribute::Type::Subject));
770 std::string n15("r8v2");
771 BaseAttributePtr a15(new Attribute(&n15,
772 Attribute::Match::Equal,
773 Attribute::Type::Subject));
776 std::string n16("author");
777 BaseAttributePtr a16(new Attribute(&n16,
778 Attribute::Match::Equal,
779 Attribute::Type::Subject));
782 std::string n17("r9a.scheme");
783 BaseAttributePtr a17(new Attribute(&n17,
784 Attribute::Match::Equal,
785 Attribute::Type::Subject));
788 std::string n18("r9b.authority");
789 BaseAttributePtr a18(new Attribute(&n18,
790 Attribute::Match::Equal,
791 Attribute::Type::Subject));
794 std::string n19("r9c.scheme-authority");
795 BaseAttributePtr a19(new Attribute(&n19,
796 Attribute::Match::Equal,
797 Attribute::Type::Subject));
800 std::string n20("resource-id");
801 BaseAttributePtr a20(new Attribute(&n20,
802 Attribute::Match::Equal,
803 Attribute::Type::Resource));
806 std::string n8("r8v2");
807 BaseAttributePtr a8(new Attribute(&n8,
808 Attribute::Match::Equal,
809 Attribute::Type::Resource));
812 std::string n9("author");
813 BaseAttributePtr a9(new Attribute(&n9,
814 Attribute::Match::Equal,
815 Attribute::Type::Resource));
818 std::string n10("r9a.scheme");
819 BaseAttributePtr a10(new Attribute(&n10,
820 Attribute::Match::Equal,
821 Attribute::Type::Resource));
824 std::string n11("r9b.authority");
825 BaseAttributePtr a11(new Attribute(&n11,
826 Attribute::Match::Equal,
827 Attribute::Type::Resource));
830 std::string n12("r9c.scheme-authority");
831 BaseAttributePtr a12(new Attribute(&n12,
832 Attribute::Match::Equal,
833 Attribute::Type::Resource));
836 std::string n21("resource-id");
837 BaseAttributePtr a21(new Attribute(&n21,
838 Attribute::Match::Equal,
839 Attribute::Type::Environment));
842 std::string n22("r8v2");
843 BaseAttributePtr a22(new Attribute(&n22,
844 Attribute::Match::Equal,
845 Attribute::Type::Environment));
848 std::string n23("author");
849 BaseAttributePtr a23(new Attribute(&n23,
850 Attribute::Match::Equal,
851 Attribute::Type::Environment));
854 std::string n24("r9a.scheme");
855 BaseAttributePtr a24(new Attribute(&n24,
856 Attribute::Match::Equal,
857 Attribute::Type::Environment));
860 std::string n25("r9b.authority");
861 BaseAttributePtr a25(new Attribute(&n25,
862 Attribute::Match::Equal,
863 Attribute::Type::Environment));
866 std::string n26("r9c.scheme-authority");
867 BaseAttributePtr a26(new Attribute(&n26,
868 Attribute::Match::Equal,
869 Attribute::Type::Environment));
872 PEPTR->extractAttributesTest();
874 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
875 RUNNER_ASSERT(result);
879 CLEANENV(POLICY_ATTR_EXAMPLE8);
881 AttributeSet attrSet;
883 std::string n1("id");
884 BaseAttributePtr a1(new Attribute(&n1,
885 Attribute::Match::Regexp,
886 Attribute::Type::Subject));
889 std::string n3("version");
890 BaseAttributePtr a3(new Attribute(&n3,
891 Attribute::Match::Equal,
892 Attribute::Type::Subject));
896 std::string n2("resource-id");
897 BaseAttributePtr a2(new Attribute(&n2,
898 Attribute::Match::Glob,
899 Attribute::Type::Resource));
902 std::string n4("author");
903 BaseAttributePtr a4(new Attribute(&n4,
904 Attribute::Match::Regexp,
905 Attribute::Type::Resource));
908 PEPTR->extractAttributesTest();
910 bool result = AttrEqual(attrSet, PEPTR->getAttributeSet());
911 RUNNER_ASSERT(result);