2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 import com
.sun
.star
.beans
.NamedValue
;
22 import java
.io
.PrintWriter
;
25 import lib
.TestEnvironment
;
26 import lib
.TestParameters
;
29 import com
.sun
.star
.container
.XNameAccess
;
30 import com
.sun
.star
.uno
.UnoRuntime
;
31 import com
.sun
.star
.uno
.XInterface
;
34 * Test for object which is represented by service
35 * <code>com.sun.star.frame.FrameLoaderFactory</code>. <p>
37 * Object implements the following interfaces :
39 * <li> <code>com::sun::star::container::XNameAccess</code></li>
40 * <li> <code>com::sun::star::container::XElementAccess</code></li>
41 * <li> <code>com::sun::star::lang::XMultiServiceFactory</code></li>
44 * @see com.sun.star.container.XNameAccess
45 * @see com.sun.star.container.XElementAccess
46 * @see com.sun.star.lang.XMultiServiceFactory
47 * @see ifc.container._XNameAccess
48 * @see ifc.container._XElementAccess
49 * @see ifc.lang._XMultiServiceFactory
51 public class FrameLoaderFactory
extends TestCase
{
54 * Creating a TestEnvironment for the interfaces to be tested.
55 * Creates an instance of the service
56 * <code>com.sun.star.frame.FrameLoaderFactory</code>. <p>
59 protected TestEnvironment createTestEnvironment
60 (TestParameters Param
, PrintWriter log
) throws Exception
{
61 Object oInterface
= Param
.getMSF().createInstance
62 ("com.sun.star.frame.FrameLoaderFactory") ;
63 XInterface oObj
= (XInterface
) oInterface
;
64 log
.println("ImplName: "+utils
.getImplName(oObj
));
66 log
.println( "creating a new environment for object" );
67 TestEnvironment tEnv
= new TestEnvironment( oObj
);
69 XNameAccess xNA
= UnoRuntime
.queryInterface
70 (XNameAccess
.class, oObj
);
71 tEnv
.addObjRelation("XMSF.serviceNames", xNA
.getElementNames());
73 // com.sun.star.container.XContainerQuery
74 NamedValue
[] querySequenze
= new NamedValue
[1];
75 NamedValue query
= new NamedValue();
77 query
.Value
= "com.sun.star.frame.Bibliography";
78 querySequenze
[0] = query
;
80 tEnv
.addObjRelation("XContainerQuery.createSubSetEnumerationByProperties",
84 } // finish method getTestEnvironment