aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/ss/usermodel
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcases/org/apache/poi/ss/usermodel')
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
index 7613da4d87..da3eb8564f 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheet.java
@@ -640,4 +640,18 @@ public abstract class BaseTestSheet extends TestCase {
sheet.setColumnHidden(2, true);
assertTrue(sheet.isColumnHidden(2));
}
+
+ public void testProtectSheet() {
+
+ Workbook wb = _testDataProvider.createWorkbook();
+ Sheet sheet = wb.createSheet();
+ assertFalse(sheet.getProtect());
+ sheet.protectSheet("Test");
+ assertTrue(sheet.getProtect());
+ sheet.protectSheet(null);
+ assertFalse(sheet.getProtect());
+
+ }
+
+
}