久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='tSl3B'></small><noframes id='tSl3B'>

      <bdo id='tSl3B'></bdo><ul id='tSl3B'></ul>
    <legend id='tSl3B'><style id='tSl3B'><dir id='tSl3B'><q id='tSl3B'></q></dir></style></legend>
    1. <tfoot id='tSl3B'></tfoot>
      1. <i id='tSl3B'><tr id='tSl3B'><dt id='tSl3B'><q id='tSl3B'><span id='tSl3B'><b id='tSl3B'><form id='tSl3B'><ins id='tSl3B'></ins><ul id='tSl3B'></ul><sub id='tSl3B'></sub></form><legend id='tSl3B'></legend><bdo id='tSl3B'><pre id='tSl3B'><center id='tSl3B'></center></pre></bdo></b><th id='tSl3B'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='tSl3B'><tfoot id='tSl3B'></tfoot><dl id='tSl3B'><fieldset id='tSl3B'></fieldset></dl></div>

        存根和模擬時的區別

        Difference between stub and when in mockito(存根和模擬時的區別)

          <i id='9CNUx'><tr id='9CNUx'><dt id='9CNUx'><q id='9CNUx'><span id='9CNUx'><b id='9CNUx'><form id='9CNUx'><ins id='9CNUx'></ins><ul id='9CNUx'></ul><sub id='9CNUx'></sub></form><legend id='9CNUx'></legend><bdo id='9CNUx'><pre id='9CNUx'><center id='9CNUx'></center></pre></bdo></b><th id='9CNUx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9CNUx'><tfoot id='9CNUx'></tfoot><dl id='9CNUx'><fieldset id='9CNUx'></fieldset></dl></div>
        1. <small id='9CNUx'></small><noframes id='9CNUx'>

          <legend id='9CNUx'><style id='9CNUx'><dir id='9CNUx'><q id='9CNUx'></q></dir></style></legend>
            <bdo id='9CNUx'></bdo><ul id='9CNUx'></ul>
            • <tfoot id='9CNUx'></tfoot>

                  <tbody id='9CNUx'></tbody>
                • 本文介紹了存根和模擬時的區別的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我是 mockito 的新手.

                  I am new to mockito.

                  需要知道存根和何時的區別

                  need to know difference between stub and when

                        1. stub(cpproxy.getBinList()).toReturn(gettestbins());
                        2. when(cpproxy.getBinList()).thenReturn(gettestbins());
                  

                  這兩者有什么區別?

                  推薦答案

                  其實它們在技術上是一樣的.最初創建 Mockito 時,我們談論的是存根,因此詞匯表遵循了這個想法.后來人們認為用交互而不是技術術語來思考更好,所以詞匯遵循when ... then ...風格.詞匯的這種變化有助于人們思考對象之間的交互、消息傳遞.這是面向對象語言中最有趣的想法(消息傳遞)(引用 Alan Kay).

                  Actually they are technically the same. When Mockito was first created, we were talking about stubs, so the vocabulary followed that idea. Later people thought it was better to think in interactions rather that technical terms, so the vocabulary followed the when ... then ... style. This change in vocabulary helps people to think about interactions, messaging between object. Which is the most interesting idea (message passing) thing in an object oriented language (quoting Alan Kay).

                  如今的測試方法已演變為行為驅動開發(來自 Dan North),這幾乎是相同的東西,但更多地關注設計時的行為.為了反映這種想法,人們要求 Mockito 提供反映這種變化的 API.因此,您還可以使用 BDDMockito

                  Nowadays testing approach has evolved to Behavior Driven Development (from Dan North), which is almost the same thing but focus even more on the behavior at design time. To reflect that thinking, people asked Mockito to offer an API that reflect that change. So you also use given ... will ... style from BDDMockito

                  given(the_type.performs_that()).willReturn(something)
                  

                  這是我現在最喜歡的詞匯,因為我使用測試來驅動我的對象設計.

                  This is my preferred vocabulary now as I use tests to drive my objects design.

                  這篇關于存根和模擬時的區別的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)

                          <tfoot id='mVfl2'></tfoot>
                          <i id='mVfl2'><tr id='mVfl2'><dt id='mVfl2'><q id='mVfl2'><span id='mVfl2'><b id='mVfl2'><form id='mVfl2'><ins id='mVfl2'></ins><ul id='mVfl2'></ul><sub id='mVfl2'></sub></form><legend id='mVfl2'></legend><bdo id='mVfl2'><pre id='mVfl2'><center id='mVfl2'></center></pre></bdo></b><th id='mVfl2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mVfl2'><tfoot id='mVfl2'></tfoot><dl id='mVfl2'><fieldset id='mVfl2'></fieldset></dl></div>
                            <bdo id='mVfl2'></bdo><ul id='mVfl2'></ul>

                            <small id='mVfl2'></small><noframes id='mVfl2'>

                              <tbody id='mVfl2'></tbody>
                            <legend id='mVfl2'><style id='mVfl2'><dir id='mVfl2'><q id='mVfl2'></q></dir></style></legend>

                          • 主站蜘蛛池模板: 日本视频在线播放 | 中文字幕在线视频观看 | www.4hu影院 | 欧美日韩视频在线第一区 | 亚洲逼院| 影音先锋成人资源 | 欧美不卡 | 亚洲高清在线播放 | 97国产爽爽爽久久久 | 在线视频成人 | 欧美视频在线播放 | 精品二区 | 久久伊 | 亚洲一级二级三级 | 国产99精品| 成人依人 | 日本电影韩国电影免费观看 | 伊人免费观看视频 | www.日韩 | 欧美在线a | 国精产品一区二区三区 | 亚洲a一区| 网站黄色av | www.日韩av.com| 毛片视频免费观看 | 亚洲精品乱码久久久久久蜜桃91 | 亚洲视频免费在线观看 | 天天操天天干天天曰 | 99re视频 | 国产精品久久久久久妇女6080 | 精品久久中文字幕 | 色综合天天天天做夜夜夜夜做 | 日韩一区二区三区视频 | 精品国产高清一区二区三区 | 欧美日韩亚洲一区 | 亚洲精品国产精品国自产在线 | 国产精品一区二区三区四区五区 | 日韩国产在线观看 | 毛片一级黄色 | 国产一区二区影院 | 国产黄色大片在线观看 |