久久久久久久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>

        存根和模擬時(shí)的區(qū)別

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

          <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>
                • 本文介紹了存根和模擬時(shí)的區(qū)別的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我是 mockito 的新手.

                  I am new to mockito.

                  需要知道存根和何時(shí)的區(qū)別

                  need to know difference between stub and when

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

                  這兩者有什么區(qū)別?

                  推薦答案

                  其實(shí)它們?cè)诩夹g(shù)上是一樣的.最初創(chuàng)建 Mockito 時(shí),我們談?wù)摰氖谴娓虼嗽~匯表遵循了這個(gè)想法.后來人們認(rèn)為用交互而不是技術(shù)術(shù)語來思考更好,所以詞匯遵循when ... then ...風(fēng)格.詞匯的這種變化有助于人們思考對(duì)象之間的交互消息傳遞.這是面向?qū)ο笳Z言中最有趣的想法(消息傳遞)(引用 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).

                  如今的測(cè)試方法已演變?yōu)樾袨轵?qū)動(dòng)開發(fā)(來自 Dan North),這幾乎是相同的東西,但更多地關(guān)注設(shè)計(jì)時(shí)的行為.為了反映這種想法,人們要求 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)
                  

                  這是我現(xiàn)在最喜歡的詞匯,因?yàn)槲沂褂脺y(cè)試來驅(qū)動(dòng)我的對(duì)象設(shè)計(jì).

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

                  這篇關(guān)于存根和模擬時(shí)的區(qū)別的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測(cè) 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個(gè)隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲(chǔ)為 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>

                          • 主站蜘蛛池模板: 91色交视频| 亚洲精品二区 | 欧美精产国品一二三区 | 美女黄色大片 | 久久99视频| 国产91在线观看 | av三级在线观看 | 色综合久久88色综合天天 | 婷婷色婷婷 | 日日日干干干 | 亚洲第一免费视频 | 色综合色综合 | 日韩成人高清 | 国产精品一区二区久久 | 天天干在线观看 | 日本精品免费 | 3d动漫精品h区xxxxx区 | 播播激情网 | 长河落日连续剧48集免费观看 | 国产又粗又猛 | 色综合婷婷 | 黑丝一区| 亚洲少妇一区 | 小镇姑娘国语版在线观看免费 | 国产一区精品在线 | 欧美亚洲国产精品 | 欧美视频在线观看一区 | 久久精品视频免费 | 亚洲一区免费视频 | 五月婷综合 | 日本久久久久久久久 | 欧美日韩国产精品 | 天天搞天天干 | 不卡视频一区二区 | 欧美在线视频免费 | 免费观看a级片 | 国产福利在线 | 亚洲涩涩涩 | 黑人操亚洲女人 | 欧美激情综合 | 一级肉体全黄裸片 |