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

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

    1. <tfoot id='SrBJC'></tfoot>
      • <bdo id='SrBJC'></bdo><ul id='SrBJC'></ul>
    2. <small id='SrBJC'></small><noframes id='SrBJC'>

        如何編寫不等于某物的匹配器

        How to write a matcher that is not equal to something(如何編寫不等于某物的匹配器)

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

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

                • 本文介紹了如何編寫不等于某物的匹配器的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我正在嘗試為通話創(chuàng)建模擬.假設(shè)我有這個(gè)方法,我正在嘗試存根:

                  I am trying to create a mock for a call. Say I have this method I am trying to stub out:

                  class ClassA {
                    public String getString(String a) {
                      return a + "hey";
                    }
                  }
                  

                  我想模擬的是:第一個(gè)實(shí)例是

                  What I am trying to mock out is: 1st instance is

                  when(classA.getString(eq("a")).thenReturn(...);`
                  

                  在同一個(gè)測(cè)試用例中

                  when(classA.getString([anything that is not a])).thenReturn(somethingelse);
                  

                  第二種情況是我的問(wèn)題:我如何匹配 anyString() 而不是 "a"?

                  The 2nd case is my question: How do I match anyString() other than "a"?

                  推薦答案

                  有了 Mockito 框架,你可以使用 AdditionalMatchers

                  With Mockito framework, you can use AdditionalMatchers

                  ClassA classA = Mockito.mock(ClassA.class);
                  Mockito.when(classA.getString(Matchers.eq("a"))).thenReturn("something"); 
                  Mockito.when(classA.getString(AdditionalMatchers.not(Matchers.eq("a")))).thenReturn("something else");
                  

                  希望對(duì)你有幫助.

                  這篇關(guān)于如何編寫不等于某物的匹配器的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(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 語(yǔ)句之前的局部變量,這有關(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='OhNHa'></tfoot>

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

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

                      <legend id='OhNHa'><style id='OhNHa'><dir id='OhNHa'><q id='OhNHa'></q></dir></style></legend>

                        <bdo id='OhNHa'></bdo><ul id='OhNHa'></ul>

                              <tbody id='OhNHa'></tbody>
                          1. 主站蜘蛛池模板: 男女羞羞视频免费 | 欧美日韩国产免费 | 久久久久av| av天天看| 国产视频中文字幕在线观看 | 99一区二区| 日韩一区中文字幕 | 青青草在线播放 | 18性欧美| 亚洲国产成人精品女人久久久 | 色悠悠久 | 欧美一级电影免费观看 | 日本久久综合 | 中文字幕亚洲精品 | 一区二区三区在线观看免费视频 | 求个av网址 | 国产中文字幕在线观看 | 日韩精品av| 天天干狠狠操 | 精品视频一区二区三区在线观看 | 日韩在线一区二区三区 | 欧美在线观看一区 | 色偷偷888欧美精品久久久 | 国产在线精品一区 | 中文在线一区二区 | 精品国产免费人成在线观看 | 神马久久久久久久久久 | 欧美一级二级在线观看 | 99久久99| 国产一区 在线视频 | 在线观看视频亚洲 | 亚洲人人| 免费观看的黄色网址 | 亚洲成人av | 久久精品91久久久久久再现 | 国产精品久久久久久久久久久久 | 91精品国产综合久久婷婷香蕉 | 久久精品福利 | 欧洲在线视频 | 久久91av | 亚洲伦理自拍 |