您的位置:首页 > 编程语言 > Java开发

Spring Boot 1.4 Test Improve

2016-11-20 00:00 260 查看
摘要: user story 和 bdd 结合的一个example (用于演讲骨架,并未做过多说明)

Testing improvements in Spring Boot 1.4

Unit Test(use junit and mockito

mock

spy

BDD (Behavior-driven development)

what is bdd? introducing-bdd

why use bdd?(BDD + DDD) 用户故事图谱与领域驱动设计的结合应用

UserStory

Title:
As a product owner, I would like to get an web based email program by which I can compose email on-line and can send email.

scenario:
1.
Given that a web based email module has been developed
And I am accessing it with proper authentication
When I shall write sender email address in To field
Or write sender email address in CC filed by not keeping empty the To field
Or write sender email address in BCC field by not keeping empty either To field
And keeping the subject field non empty
And write something in body text area which excepts rich text
And press or click send button

Then my email will be sent
And the event will be logged in log file.

2.
Given that a web based email module has been developed
And I am accessing it with bad authentication

Then whe website return 401 error code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: