Skip to main content

Home/ InfokeyDEV/ Group items tagged mock

Rss Feed Group items tagged

Benx Shen

mock框架搞什麼搞? - 0 views

  •  
    發文者 taowen 提出了一個對於 mock 框架(jMock, EasyMock)的使用經驗,認為這樣的框架並沒有帶給他測試上的方便性,反而似乎使得測試程式碼更多更亂,因此,他提出了對於 mock 框架技術的質疑。

    不過,taowen 並不是單純地從情緒上發揮論述,而是舉出了一些簡單的程式馬來進行測試,試圖寫 mock 測試程式並非那麼簡易。另外,他自己另外展示了如何不用 mock 框架來進行單元測試。從這一點來看,taowen 很棒地說明了該如何進行單元測試,無論使用哪一種方法。

    值得我學習的是,taowen 提出了自己對於 mock 框架的觀點,他的經驗告訴他:mock 到底在搞什麼東西!?於是勇敢地提出質疑。這樣的質疑,我認為比學習技術本身更有價值。從結果來看,這引發了相當多的迴響與討論,有人認為這樣,卻有人不以為然。(我相信 taowen 心臟必須要夠強,才能夠接受不同的意見而不感到生氣。我覺得我還需要學習這樣的質疑態度與接受批評的雅量。)總的來說,我發現我看到了更多元的資訊,作為一個學習者,比起單純地從一篇文章學習技術還要能夠學得更多。

    雖然我使用 mock 技術有一小段時間,而我也懂得 mock 真正的意圖以及單元測試所帶來的價值,這並不會使得我一開始就認為 taowen 是錯誤的,即便看完他的發表之後,我仍然不認為他不應該提出這樣的質疑(我想我已經在上面一段表達我的「推崇」之意,以及我所認為背後的價值)。和一些參與討論的網友一樣,認為這不是一個完全適當的例子,但 taowen 也的確指出了 mock 技術會讓開發者詬病之處。然而,這並不足以說明 mock 真是非常難用,或造成了單元測試的困擾。實際的狀況是,我們得再從 mock 技術所帶來的好處出發,瞭解了之
Benx Shen

EasyMock 2.2 Readme - 0 views

  • EasyMock 2 is a library that provides an easy way to use Mock Objects for given interfaces.
  • EasyMock 2 Benefits Hand-writing classes for Mock Objects is not needed. Supports refactoring-safe Mock Objects: test code will not break at runtime when renaming methods or reordering method parameters Supports return values and exceptions. Supports checking the order of method calls, for one or more Mock Objects.
juzi789

lebron 12 christmas 11499$ amounts of money - 0 views

Lebron 12 christmas 11499$ amounts of money the decision of the Nike fact is not enough. Sooner or later, you should definitely affect the stability of the heel. This is true not only for our safet...

lebron 12 christmas

started by juzi789 on 16 Dec 14 no follow-up yet
beizi789

nike lebron 12 data and traction while playing - 0 views

Nike lebron 12 data and traction while playing the Nike Zoom Air is a thin materials that offers cushioning inside the midsole of the shoe. Based on the application this can be segmented into the h...

nike lebron 12 data

started by beizi789 on 02 Jan 15 no follow-up yet
gxijue

nike kobe 10 silk blunt trauma to her eyeball - 0 views

Nike kobe 10 silk blunt trauma to her eyeball in other words, if you're doing Nike Kobe 10 Silk for sale a layup from the left side of the hoop, you need to push off with your right foot. This give...

nike kobe 10 silk

started by gxijue on 19 Mar 15 no follow-up yet
hanhan789

nike kobe 9 elite low beethoven for sale college teams and a lot more - 0 views

Nike kobe 9 elite low beethoven for sale college teams and a lot more 7) You try to recapture your youth and buy a pair of Converse All Star tennis shoes. These shoes proceed to do everything in th...

nike kobe 9 elite

started by hanhan789 on 26 Nov 14 no follow-up yet
mili789

nike kd 7 for sale and there was some - 0 views

Nike kd 7 for sale and there was some "we are definitely where we want to be. We are top two and three or four games clear [of Townsville in third]. I was amazed about a month ago when we had a mee...

nike kd 7 for sale

started by mili789 on 30 Oct 14 no follow-up yet
1 - 8 of 8
Showing 20 items per page