KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > hssf > record > aggregates > TestFormulaRecordAggregate


1 /* ====================================================================
2    Copyright 2003-2004 Apache Software Foundation
3
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7
8        http://www.apache.org/licenses/LICENSE-2.0
9
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15 ==================================================================== */

16
17 /*
18  * TestFormulaRecordAggregate.java
19  *
20  * Created on March 21, 2003, 12:32 AM
21  */

22
23 package org.apache.poi.hssf.record.aggregates;
24 import org.apache.poi.hssf.record.FormulaRecord;
25 import org.apache.poi.hssf.record.StringRecord;
26
27 /**
28  *
29  * @author avik
30  */

31 public class TestFormulaRecordAggregate extends junit.framework.TestCase {
32     
33     /** Creates a new instance of TestFormulaRecordAggregate */
34     public TestFormulaRecordAggregate(String JavaDoc arg) {
35         super(arg);
36     }
37     
38     public void testClone() {
39         FormulaRecord f = new FormulaRecord();
40         StringRecord s = new StringRecord();
41         FormulaRecordAggregate fagg = new FormulaRecordAggregate(f,s);
42         FormulaRecordAggregate newFagg = (FormulaRecordAggregate) fagg.clone();
43         assertTrue("objects are different", fagg!=newFagg);
44         assertTrue("deep clone", fagg.getFormulaRecord() != newFagg.getFormulaRecord());
45         assertTrue("deep clone", fagg.getStringRecord() != newFagg.getStringRecord());
46
47         
48     }
49     
50 }
51
Popular Tags