12#include <com/sun/star/container/XIndexAccess.hpp>
14#include <com/sun/star/uno/Reference.hxx>
16#include <cppunit/TestAssert.h>
19using namespace css::uno;
25 uno::Reference<container::XIndexAccess> xIndexAccess(
init(), UNO_QUERY_THROW);
26 CPPUNIT_ASSERT_EQUAL(
m_nItems, xIndexAccess->getCount());
31 uno::Reference<container::XIndexAccess> xIndexAccess(
init(), UNO_QUERY_THROW);
32 CPPUNIT_ASSERT_EQUAL(
m_nItems, xIndexAccess->getCount());
36 Any aAny = xIndexAccess->getByIndex(0);
37 CPPUNIT_ASSERT(aAny.hasValue());
39 aAny = xIndexAccess->getByIndex(
m_nItems / 2);
40 CPPUNIT_ASSERT(aAny.hasValue());
42 aAny = xIndexAccess->getByIndex(
m_nItems - 1);
43 CPPUNIT_ASSERT(aAny.hasValue());
49 uno::Reference<container::XIndexAccess> xIndexAccess(
init(), UNO_QUERY_THROW);
virtual css::uno::Reference< css::uno::XInterface > init()=0
void testGetByIndexException()