_XMutableTreeNode.java (ef39d40d) _XMutableTreeNode.java (bb6af6bc)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 126 unchanged lines hidden (view full) ---

135 XMutableTreeNode myNode2 = nodeCreator.createNode("myNodeToInsert2");
136
137 try {
138 log.println("try to insert a valid node on invalid index '-3'...");
139 oObj.insertChildByIndex(-3, myNode2);
140 log.println("ERROR: expected IndexOutOfBoundsException was not thrown => FAILED");
141 bOK = false;
142 } catch (com.sun.star.lang.IllegalArgumentException ex) {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 126 unchanged lines hidden (view full) ---

135 XMutableTreeNode myNode2 = nodeCreator.createNode("myNodeToInsert2");
136
137 try {
138 log.println("try to insert a valid node on invalid index '-3'...");
139 oObj.insertChildByIndex(-3, myNode2);
140 log.println("ERROR: expected IndexOutOfBoundsException was not thrown => FAILED");
141 bOK = false;
142 } catch (com.sun.star.lang.IllegalArgumentException ex) {
143 log.println("ERROR: wrong IllegalArgumentException was thrown. Expeced is IndexOutOfBoundsException => FAILED");
143 log.println("ERROR: wrong IllegalArgumentException was thrown. Expected is IndexOutOfBoundsException => FAILED");
144 bOK = false;
145 } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
146 log.println("Expected IndexOutOfBoundsException was thrown => OK");
147 }
148
149 try {
150 log.println("try to insert the object itself...");
151 oObj.insertChildByIndex(0, oObj);

--- 20 unchanged lines hidden (view full) ---

172 } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
173 log.println("ERROR: IndexOutOfBoundsException was thrown => FAILED");
174 bOK = false;
175 }
176
177 try {
178 log.println("try to remove node at invalid index '-3'");
179 oObj.removeChildByIndex(-3);
144 bOK = false;
145 } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
146 log.println("Expected IndexOutOfBoundsException was thrown => OK");
147 }
148
149 try {
150 log.println("try to insert the object itself...");
151 oObj.insertChildByIndex(0, oObj);

--- 20 unchanged lines hidden (view full) ---

172 } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
173 log.println("ERROR: IndexOutOfBoundsException was thrown => FAILED");
174 bOK = false;
175 }
176
177 try {
178 log.println("try to remove node at invalid index '-3'");
179 oObj.removeChildByIndex(-3);
180 log.println("ERROR: expeced IndexOutOfBoundsException was not thrown => FAILED");
180 log.println("ERROR: expected IndexOutOfBoundsException was not thrown => FAILED");
181 bOK = false;
182 } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
183 log.println("expected IndexOutOfBoundsException was thrown => OK");
184 }
185 tRes.tested("removeChildByIndex()", bOK);
186 }
187
188 public void _setHasChildrenOnDemand(){

--- 103 unchanged lines hidden ---
181 bOK = false;
182 } catch (com.sun.star.lang.IndexOutOfBoundsException ex) {
183 log.println("expected IndexOutOfBoundsException was thrown => OK");
184 }
185 tRes.tested("removeChildByIndex()", bOK);
186 }
187
188 public void _setHasChildrenOnDemand(){

--- 103 unchanged lines hidden ---