diff options
Diffstat (limited to 'qadevOOo/tests/java/ifc/presentation')
8 files changed, 455 insertions, 0 deletions
diff --git a/qadevOOo/tests/java/ifc/presentation/_OutlineView.java b/qadevOOo/tests/java/ifc/presentation/_OutlineView.java new file mode 100644 index 000000000000..1b1f4af09fda --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_OutlineView.java @@ -0,0 +1,36 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package ifc.presentation; + +import lib.MultiPropertyTest; + +public class _OutlineView extends MultiPropertyTest { + +} // finish class _PresentationView + + diff --git a/qadevOOo/tests/java/ifc/presentation/_Presentation.java b/qadevOOo/tests/java/ifc/presentation/_Presentation.java new file mode 100644 index 000000000000..41b89e851459 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_Presentation.java @@ -0,0 +1,91 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package ifc.presentation; + +import lib.MultiPropertyTest; +import lib.Status; +import lib.StatusException; + +import com.sun.star.presentation.XPresentation; + +/** +* Testing <code>com.sun.star.presentation.Presentation</code> +* service properties : +* <ul> +* <li><code> AllowAnimations</code></li> +* <li><code> CustomShow</code></li> +* <li><code> FirstPage</code></li> +* <li><code> IsAlwaysOnTop</code></li> +* <li><code> IsAutomatic</code></li> +* <li><code> IsEndless</code></li> +* <li><code> IsFullScreen</code></li> +* <li><code> IsLivePresentation</code></li> +* <li><code> IsMouseVisible</code></li> +* <li><code> Pause</code></li> +* <li><code> StartWithNavigator</code></li> +* <li><code> UsePen</code></li> +* </ul> <p> +* This test needs the following object relations : +* <ul> +* <li> <code>'Presentation'</code> (of type <code>XPresentation</code>): +* for test of property <code>IsLivePresentation</code> +* presentation start needed </li> +* <ul> <p> +* Properties testing is automated by <code>lib.MultiPropertyTest</code>. +* @see com.sun.star.presentation.Presentation +* @see com.sun.star.presentation.XPresentation +*/ +public class _Presentation extends MultiPropertyTest { + + public void _IsLivePresentation() { + XPresentation aPresentation = (XPresentation) + tEnv.getObjRelation("Presentation"); + if (aPresentation == null) throw new StatusException(Status.failed + ("Relation 'Presentation' not found")); + + aPresentation.start(); + testProperty("IsLivePresentation"); + } + + protected PropertyTester CustomShowTester = new PropertyTester() { + protected Object getNewValue(String propName, Object oldValue) + throws java.lang.IllegalArgumentException { + if ( ((String)oldValue).equals("SecondPresentation") ) { + return new String("FirstPresentation"); + } else { + return new String("SecondPresentation"); + } + } + }; + + public void _CustomShow() { + testProperty("CustomShow", CustomShowTester); + } +} // finish class _Presentation + + diff --git a/qadevOOo/tests/java/ifc/presentation/_PresentationView.java b/qadevOOo/tests/java/ifc/presentation/_PresentationView.java new file mode 100644 index 000000000000..a79684570a50 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_PresentationView.java @@ -0,0 +1,56 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package ifc.presentation; + +import lib.MultiPropertyTest; + +public class _PresentationView extends MultiPropertyTest { + + /** + * Property tester which changes DrawPage. + */ + protected PropertyTester PageTester = new PropertyTester() { + protected Object getNewValue(String propName, Object oldValue) + throws java.lang.IllegalArgumentException { + if (oldValue.equals(tEnv.getObjRelation("FirstPage"))) + return tEnv.getObjRelation("SecondPage"); else + return tEnv.getObjRelation("FirstPage"); + } + } ; + + /** + * This property must be an XDrawPage + */ + public void _CurrentPage() { + log.println("Testing with custom Property tester") ; + testProperty("CurrentPage", PageTester) ; + } + +} // finish class _PresentationView + + diff --git a/qadevOOo/tests/java/ifc/presentation/_PreviewView.java b/qadevOOo/tests/java/ifc/presentation/_PreviewView.java new file mode 100644 index 000000000000..1e2e6436ab04 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_PreviewView.java @@ -0,0 +1,39 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package ifc.presentation; + +import lib.MultiPropertyTest; + +public class _PreviewView extends MultiPropertyTest { + + public void _CurrentPage() { + Object obj1 = tEnv.getObjRelation("FirstPage"); + Object obj2 = tEnv.getObjRelation("SecondPage"); + testProperty("CurrentPage",obj1,obj2); + } +} diff --git a/qadevOOo/tests/java/ifc/presentation/_SlidesView.java b/qadevOOo/tests/java/ifc/presentation/_SlidesView.java new file mode 100644 index 000000000000..e20e9a9d14ab --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_SlidesView.java @@ -0,0 +1,34 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package ifc.presentation; + +import lib.MultiPropertyTest; + +public class _SlidesView extends MultiPropertyTest { + +} diff --git a/qadevOOo/tests/java/ifc/presentation/_XCustomPresentationSupplier.java b/qadevOOo/tests/java/ifc/presentation/_XCustomPresentationSupplier.java new file mode 100644 index 000000000000..8507daae8bf0 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_XCustomPresentationSupplier.java @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package ifc.presentation; + +import lib.MultiMethodTest; + +import com.sun.star.container.XNameAccess; +import com.sun.star.presentation.XCustomPresentationSupplier; + +/** +* Testing <code>com.sun.star.presentation.XCustomPresentationSupplier</code> +* interface methods : +* <ul> +* <li><code> getCustomPresentations()</code></li> +* </ul> <p> +* @see com.sun.star.presentation.XCustomPresentationSupplier +*/ +public class _XCustomPresentationSupplier extends MultiMethodTest { + + public XCustomPresentationSupplier oObj = null; + + /** + * Test calls the method and checks returned value. <p> + * Has <b> OK </b> status if returned value isn't null. <p> + */ + public void _getCustomPresentations() { + XNameAccess NA = oObj.getCustomPresentations(); + tRes.tested("getCustomPresentations()", NA != null); + } + +} + + diff --git a/qadevOOo/tests/java/ifc/presentation/_XPresentation.java b/qadevOOo/tests/java/ifc/presentation/_XPresentation.java new file mode 100644 index 000000000000..d729348bed04 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_XPresentation.java @@ -0,0 +1,83 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package ifc.presentation; + +import lib.MultiMethodTest; + +import com.sun.star.presentation.XPresentation; + +/** +* Testing <code>com.sun.star.presentation.XPresentation</code> +* interface methods : +* <ul> +* <li><code> start()</code></li> +* <li><code> end()</code></li> +* <li><code> rehearseTimings()</code></li> +* </ul> <p> +* @see com.sun.star.presentation.XPresentation +*/ +public class _XPresentation extends MultiMethodTest { + + public XPresentation oObj = null; + + /** + * Test calls the method. <p> + * Has <b> OK </b> status if the method successfully returns. <p> + */ + public void _start() { + oObj.start(); + tRes.tested("start()", true); + } + + /** + * Test calls the method. <p> + * Has <b> OK </b> status if the method successfully returns. <p> + * The following method tests are to be completed successfully before : + * <ul> + * <li> <code> start() </code> : presentation must be started before</li> + * </ul> + */ + public void _end() { + requiredMethod("start()"); + + oObj.end(); + tRes.tested("end()", true); + } + + /** + * Test calls the method. <p> + * Has <b> OK </b> status if the method successfully returns. <p> + */ + public void _rehearseTimings() { + oObj.rehearseTimings(); + tRes.tested("rehearseTimings()", true); + } + +} // finish class _XPresentation + + diff --git a/qadevOOo/tests/java/ifc/presentation/_XPresentationSupplier.java b/qadevOOo/tests/java/ifc/presentation/_XPresentationSupplier.java new file mode 100644 index 000000000000..b3fbdcb4c407 --- /dev/null +++ b/qadevOOo/tests/java/ifc/presentation/_XPresentationSupplier.java @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +package ifc.presentation; + +import lib.MultiMethodTest; + +import com.sun.star.presentation.XPresentation; +import com.sun.star.presentation.XPresentationSupplier; + +/** +* Testing <code>com.sun.star.presentation.XPresentationSupplier</code> +* interface methods : +* <ul> +* <li><code> getPresentation()</code></li> +* </ul> <p> +* @see com.sun.star.presentation.XPresentationSupplier +*/ +public class _XPresentationSupplier extends MultiMethodTest { + + public XPresentationSupplier oObj = null; + + /** + * Test calls the method and checks returned value. <p> + * Has <b> OK </b> status if returned value isn't null. <p> + */ + public void _getPresentation() { + XPresentation NA = oObj.getPresentation(); + tRes.tested("getPresentation()", NA != null); + } + +} + + |