10#include <com/sun/star/util/XSearchable.hpp>
11#include <com/sun/star/util/XSearchDescriptor.hpp>
12#include <com/sun/star/container/XIndexAccess.hpp>
13#include <cppunit/TestAssert.h>
18using namespace css::uno;
24 uno::Reference<util::XSearchable> xSearchable(
init(), UNO_QUERY_THROW);
25 uno::Reference<util::XSearchDescriptor> xSearchDescr = xSearchable->createSearchDescriptor();
28 uno::Reference<container::XIndexAccess> xIndex = xSearchable->findAll(xSearchDescr);
29 CPPUNIT_ASSERT(xIndex.is());
30 CPPUNIT_ASSERT_EQUAL(
mnCount, xIndex->getCount());
35 uno::Reference<util::XSearchable> xSearchable(
init(), UNO_QUERY_THROW);
36 uno::Reference<util::XSearchDescriptor> xSearchDescr = xSearchable->createSearchDescriptor();
39 uno::Reference<uno::XInterface> xElement = xSearchable->findFirst(xSearchDescr);
40 CPPUNIT_ASSERT(xElement.is());
45 uno::Reference<util::XSearchable> xSearchable(
init(), UNO_QUERY_THROW);
46 uno::Reference<util::XSearchDescriptor> xSearchDescr = xSearchable->createSearchDescriptor();
49 uno::Reference<uno::XInterface> xElement = xSearchable->findFirst(xSearchDescr);
50 CPPUNIT_ASSERT(xElement.is());
54 uno::Reference<uno::XInterface> xElement2 = xSearchable->findNext(xElement, xSearchDescr);
55 CPPUNIT_ASSERT(xElement2.is());
virtual css::uno::Reference< css::uno::XInterface > init()=0