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~ 快乐编码,享受生活~
  • 相关阅读:
    树状数组&线段树
    8月7日小练
    8月6日小练
    LID&LDS 的另外一种算法
    LCS,LIS,LCIS
    8-11-Exercise
    8-10-Exercise
    线段树
    8-7-Exercise
    8-6-Exercise
  • 原文地址:https://www.cnblogs.com/tedzhang/p/3117186.html
Copyright © 2011-2022 走看看