Minor junit fix after r674953 (bug 45354). Hooked up loose tests in suite.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@675086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2262b7c5c8
commit
d03e5c688f
@ -22,6 +22,7 @@ import junit.framework.TestSuite;
|
||||
|
||||
import org.apache.poi.hssf.eventmodel.TestEventRecordFactory;
|
||||
import org.apache.poi.hssf.eventmodel.TestModelFactory;
|
||||
import org.apache.poi.hssf.eventusermodel.AllEventUserModelTests;
|
||||
import org.apache.poi.hssf.model.AllModelTests;
|
||||
import org.apache.poi.hssf.record.AllRecordTests;
|
||||
import org.apache.poi.hssf.usermodel.AllUserModelTests;
|
||||
@ -48,6 +49,7 @@ public final class HSSFTests {
|
||||
TestSuite suite = new TestSuite("Tests for org.apache.poi.hssf");
|
||||
// $JUnit-BEGIN$
|
||||
|
||||
suite.addTest(AllEventUserModelTests.suite());
|
||||
suite.addTest(AllModelTests.suite());
|
||||
suite.addTest(AllUserModelTests.suite());
|
||||
suite.addTest(AllRecordTests.suite());
|
||||
|
@ -0,0 +1,38 @@
|
||||
/* ====================================================================
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
contributor license agreements. See the NOTICE file distributed with
|
||||
this work for additional information regarding copyright ownership.
|
||||
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
(the "License"); you may not use this file except in compliance with
|
||||
the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
==================================================================== */
|
||||
|
||||
package org.apache.poi.hssf.eventusermodel;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
/**
|
||||
* Collects all tests for <tt>org.apache.poi.hssf.eventusermodel</tt>.
|
||||
*
|
||||
* @author Josh Micich
|
||||
*/
|
||||
public class AllEventUserModelTests {
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite result = new TestSuite(AllEventUserModelTests.class.getName());
|
||||
result.addTestSuite(TestEventWorkbookBuilder.class);
|
||||
result.addTestSuite(TestFormatTrackingHSSFListener.class);
|
||||
result.addTestSuite(TestHSSFEventFactory.class);
|
||||
result.addTestSuite(TestMissingRecordAwareHSSFListener.class);
|
||||
return result;
|
||||
}
|
||||
}
|
@ -134,7 +134,7 @@ public final class TestEventWorkbookBuilder extends TestCase {
|
||||
fr = (FormulaRecord)mockListen._frecs.get(5);
|
||||
assertEquals(6, fr.getRow());
|
||||
assertEquals(0, fr.getColumn());
|
||||
assertEquals("SUM('Sh3'!A1:A4)", FormulaParser.toFormulaString(stubHSSF, fr.getParsedExpression()));
|
||||
assertEquals("SUM(Sh3!A1:A4)", FormulaParser.toFormulaString(stubHSSF, fr.getParsedExpression()));
|
||||
|
||||
|
||||
// Now, load via Usermodel and re-check
|
||||
@ -142,7 +142,7 @@ public final class TestEventWorkbookBuilder extends TestCase {
|
||||
POIFSFileSystem fs = new POIFSFileSystem(is);
|
||||
HSSFWorkbook wb = new HSSFWorkbook(fs);
|
||||
assertEquals("Sheet1!A1", wb.getSheetAt(0).getRow(1).getCell(0).getCellFormula());
|
||||
assertEquals("SUM('Sh3'!A1:A4)", wb.getSheetAt(0).getRow(6).getCell(0).getCellFormula());
|
||||
assertEquals("SUM(Sh3!A1:A4)", wb.getSheetAt(0).getRow(6).getCell(0).getCellFormula());
|
||||
}
|
||||
|
||||
private static final class MockHSSFListener implements HSSFListener {
|
||||
|
@ -71,6 +71,7 @@ public final class TestSheetNameFormatter extends TestCase {
|
||||
confirmCellNameMatch("aa1", true);
|
||||
confirmCellNameMatch("A1A", false);
|
||||
confirmCellNameMatch("A1A1", false);
|
||||
confirmCellNameMatch("Sh3", false);
|
||||
confirmCellNameMatch("SALES20080101", false); // out of range
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user