Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

空字符串MOCK模板实现问题 #13

Closed
Bosn opened this issue Jun 23, 2014 · 1 comment
Closed

空字符串MOCK模板实现问题 #13

Bosn opened this issue Jun 23, 2014 · 1 comment

Comments

@Bosn
Copy link
Contributor

Bosn commented Jun 23, 2014

dataType=String
remark=@mock=

时,空字符串被自动转换为默认值1,非用户所预期。

用户预期结果:
"val" : ""

@Bosn
Copy link
Contributor Author

Bosn commented Jun 23, 2014

已修复。并对各种数据类型下不写mock标签时做了特殊处理。
boolean => 随机true/false
string => "测试内容[0-9a-z]{4}" // 正则随机
number => 5位随机数
array => 固定[true, false]
array => []
object => {}

@Bosn Bosn closed this as completed Jun 23, 2014
Bosn added a commit that referenced this issue Jun 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant