ZAttributeTest.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙,邂逅框架梦]
  3. *
  4. * 知启蒙WEB容器(zhiqim_httpd)在LGPL3.0协议下开源:https://www.zhiqim.com/gitcan/zhiqim/zhiqim_httpd.htm
  5. *
  6. * This file is part of [zhiqim_httpd].
  7. *
  8. * [zhiqim_httpd] is free software: you can redistribute
  9. * it and/or modify it under the terms of the GNU Lesser General Public License
  10. * as published by the Free Software Foundation, either version 3 of the
  11. * License, or (at your option) any later version.
  12. *
  13. * [zhiqim_httpd] is distributed in the hope that it will
  14. * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public License
  19. * along with [zhiqim_httpd].
  20. * If not, see <http://www.gnu.org/licenses/>.
  21. */
  22. package org.zhiqim.httpd.context.config;
  23. import org.zhiqim.httpd.context.config.ZAttribute;
  24. public class ZAttributeTest
  25. {
  26. public static void main(String[] args)
  27. {
  28. ZAttribute attribute = new ZAttribute();
  29. attribute.setName("验证码长度");
  30. attribute.setKey("validateCode.width");
  31. attribute.setValue("30");
  32. String ret = "<attribute name=\"验证码长度\" key=\"validateCode.width\" value=\"30\" />";
  33. System.out.println(attribute.toString());
  34. System.out.println(ret.equals(attribute.toString()));
  35. }
  36. }