mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
add missing types to CellUtil.namePropertyMap
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925936 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17cb74b3ff
commit
9a4a4270ec
@ -277,6 +277,7 @@ public final class CellUtil {
|
||||
map.put(BORDER_RIGHT, CellPropertyType.BORDER_RIGHT);
|
||||
map.put(BORDER_TOP, CellPropertyType.BORDER_TOP);
|
||||
map.put(BOTTOM_BORDER_COLOR, CellPropertyType.BOTTOM_BORDER_COLOR);
|
||||
map.put(DATA_FORMAT, CellPropertyType.DATA_FORMAT);
|
||||
map.put(LEFT_BORDER_COLOR, CellPropertyType.LEFT_BORDER_COLOR);
|
||||
map.put(RIGHT_BORDER_COLOR, CellPropertyType.RIGHT_BORDER_COLOR);
|
||||
map.put(TOP_BORDER_COLOR, CellPropertyType.TOP_BORDER_COLOR);
|
||||
@ -290,9 +291,10 @@ public final class CellUtil {
|
||||
map.put(INDENTION, CellPropertyType.INDENTION);
|
||||
map.put(LOCKED, CellPropertyType.LOCKED);
|
||||
map.put(ROTATION, CellPropertyType.ROTATION);
|
||||
map.put(VERTICAL_ALIGNMENT, CellPropertyType.VERTICAL_ALIGNMENT);
|
||||
map.put(SHRINK_TO_FIT, CellPropertyType.SHRINK_TO_FIT);
|
||||
map.put(QUOTE_PREFIXED, CellPropertyType.QUOTE_PREFIXED);
|
||||
map.put(VERTICAL_ALIGNMENT, CellPropertyType.VERTICAL_ALIGNMENT);
|
||||
map.put(WRAP_TEXT, CellPropertyType.WRAP_TEXT);
|
||||
namePropertyMap = Collections.unmodifiableMap(map);
|
||||
}
|
||||
|
||||
|
||||
36
poi/src/test/java/org/apache/poi/ss/util/TestCellUtil.java
Normal file
36
poi/src/test/java/org/apache/poi/ss/util/TestCellUtil.java
Normal file
@ -0,0 +1,36 @@
|
||||
/* ====================================================================
|
||||
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.ss.util;
|
||||
|
||||
import org.apache.poi.ss.usermodel.CellPropertyType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* Test for CellUtil constants
|
||||
*/
|
||||
class TestCellUtil {
|
||||
@Test
|
||||
void testNamePropertyMap() {
|
||||
Arrays.stream(CellPropertyType.values()).forEach(cellPropertyType ->
|
||||
assertTrue(CellUtil.namePropertyMap.containsValue(cellPropertyType),
|
||||
"missing " + cellPropertyType));
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user