package commyblogwebsiteutils;import commyblogwebsiteconstantWebConst;import orgapachecommonslang3StringUtils;import orgjunitjupiterapiTest;import orgspringframeworkbootwebservletserverSession;import
这是一个测试类,用于测试TaleUtils工具类中的一些方法是否正确。
测试方法包括:
- isEmail():测试是否为合法的邮箱地址。
- testMD5encode():测试MD5加密方法是否正确。
- testGetUploadFilePath():测试获取上传文件路径是否正确。
- testGetRandomNumber():测试生成随机数字字符串是否正确。
- testHtmlToText():测试将HTML转换为纯文本是否正确。
- testHtmlToTextWithEmptyString():测试将空字符串转换为纯文本是否正确。
- testHtmlToTextWithNullString():测试将null字符串转换为纯文本是否正确。
- testHtmlToTextWithOnlyTags():测试只包含HTML标签的字符串转换为纯文本是否正确。
- testHtmlToTextWithOnlySpaces():测试只包含空格的HTML字符串转换为纯文本是否正确。
原文地址: https://www.cveoy.top/t/topic/ckUB 著作权归作者所有。请勿转载和采集!