zoukankan      html  css  js  c++  java
  • Test Driven Development

    Recently, I start realize the benefits of TDD, it really could give me a chance to think about how others people gonna use my API, how should I design it.

    So normally, Create a falling test case first(Simulate how user will use the API), then start implement the method to make the test case pass(keep things as simple as possible), after that, refactor the method, improve the internal implementation without changing the external behavior.

    Principle:

    • One logical assertion per test.
    • Keep test code maintainable and Don’t repeat yourself.
    • Test could be independent, could run in any order.
    Assembly Unit Test Assembly
    Namespace Namespace_Test Folder
    Class Class_Test Folder
    Behavior… Test Class…
    Happy Coding Everyday~ 快乐编码,享受生活~
  • 相关阅读:
    1.Apache与Tomcat
    jeeplus 多选框
    GIT 回滚
    jsp 中data 转换 字符串
    Pattern和Matcher中表达式
    web.xml 详细介绍
    $.ajax()方法详解
    My 2016
    如何做好一个保安队长。
    集合之WeakHashMap
  • 原文地址:https://www.cnblogs.com/tedzhang/p/3117186.html
Copyright © 2011-2022 走看看