@Test public void getObjectPolicy() { when(this.httpRequest.getParameter("objectPolicy")).thenReturn("updateOrCreate"); this.editForm.readRequest(); assertEquals(ObjectPolicyType.UPDATE_OR_CREATE, this.editForm.getObjectPolicy()); when(this.httpRequest.getParameter("objectPolicy")).thenReturn(""); this.editForm.readRequest(); assertNull(this.editForm.getObjectPolicy()); when(this.httpRequest.getParameter("objectPolicy")).thenReturn("foobar"); this.editForm.readRequest(); assertNull(this.editForm.getObjectPolicy()); when(this.httpRequest.getParameter("objectPolicy")).thenReturn("UPDATE"); this.editForm.readRequest(); assertNull(this.editForm.getObjectPolicy()); when(this.httpRequest.getParameter("objectPolicy")).thenReturn("update"); this.editForm.readRequest(); assertEquals(ObjectPolicyType.UPDATE, this.editForm.getObjectPolicy()); }
public ObjectPolicyType getObjectPolicy() { return this.objectPolicy; }
EditForm extends XWikiForm { public ObjectPolicyType getObjectPolicy() { return this.objectPolicy; } }
EditForm extends XWikiForm { public ObjectPolicyType getObjectPolicy() { return this.objectPolicy; }  }
EditForm extends XWikiForm { public ObjectPolicyType getObjectPolicy() { return this.objectPolicy; }  @Override void readRequest(); void setTags(String[] parameter); String getTags(); String getContent(); void setContent(String content); String getWeb(); void setWeb(String web); String getName(); void setName(String name); String getLanguage(); void setLanguage(String language); int getObjectNumbers(String prefix); Map<String, String[]> getObject(String prefix); String getParent(); void setParent(String parent); String getCreator(); void setCreator(String creator); String getTemplate(); void setTemplate(String template); String getDefaultTemplate(); void setDefaultTemplate(String defaultTemplate); String getDefaultLanguage(); void setDefaultLanguage(String defaultLanguage); String getTitle(); void setTitle(String title); String getComment(); void setComment(String comment); boolean isMinorEdit(); void setMinorEdit(boolean isMinorEdit); boolean isLockForce(); void setLockForce(boolean lockForce); String getSyntaxId(); void setSyntaxId(String syntaxId); String getHidden(); void setHidden(String hidden); ObjectPolicyType getObjectPolicy(); Map<String, List<Integer>> getObjectsToRemove(); Map<String, List<Integer>> getObjectsToAdd(); Map<String, SortedMap<Integer, Map<String, String[]>>> getUpdateOrCreateMap(); }
EditForm extends XWikiForm { public ObjectPolicyType getObjectPolicy() { return this.objectPolicy; }  @Override void readRequest(); void setTags(String[] parameter); String getTags(); String getContent(); void setContent(String content); String getWeb(); void setWeb(String web); String getName(); void setName(String name); String getLanguage(); void setLanguage(String language); int getObjectNumbers(String prefix); Map<String, String[]> getObject(String prefix); String getParent(); void setParent(String parent); String getCreator(); void setCreator(String creator); String getTemplate(); void setTemplate(String template); String getDefaultTemplate(); void setDefaultTemplate(String defaultTemplate); String getDefaultLanguage(); void setDefaultLanguage(String defaultLanguage); String getTitle(); void setTitle(String title); String getComment(); void setComment(String comment); boolean isMinorEdit(); void setMinorEdit(boolean isMinorEdit); boolean isLockForce(); void setLockForce(boolean lockForce); String getSyntaxId(); void setSyntaxId(String syntaxId); String getHidden(); void setHidden(String hidden); ObjectPolicyType getObjectPolicy(); Map<String, List<Integer>> getObjectsToRemove(); Map<String, List<Integer>> getObjectsToAdd(); Map<String, SortedMap<Integer, Map<String, String[]>>> getUpdateOrCreateMap();  }