Tags » Mock

Vegetarian restaurants in : Where to go for meat-free, vegan and raw food

(Source: thehoneycombers.com)

Gorgonzola consommé with pears, port jelly, and artichokes at Pollen

Singapore is a foodie’s paradise when it comes to eating out, with dining spots catering for all tastebuds and… 1,533 more words

Singapore

A Little Bit of Shopping & Ramble

Tapping my foot and waiting on Dena thinking I did tell her to meet us at the car…hope she doesn’t have too many packages as the trunk is full and I am holding this last package..Yes today I did my little bit of monthly shopping ~ trying to hit sales, and things that I just had on my wish list ~ am sure like some of you the budget for SL is limited so I make a list and once I have my monthly pay in after paying tiers I rush around like this mad woman LOL getting what I can plus save just a little for those sales that everyone knows you just gotta get ~ but on that note I do try to get value for my money as well… 534 more words

Because We Love A Good Correction

A truly top notch newspaper correction. ⭐️⭐️⭐️⭐️⭐️ #Scotland pic.twitter.com/gcOVMxP4ww

— Jill Stark (@jillastark) May 17, 2016

(Hat tip: Scissorhead Mountjoy)

Media

Mockito读书笔记(2)--Mock的基本使用

为了方便在类中使用,可以使用java 的静态引入,将mockito中常用的方法引入到单元测试类中。

Import static org.mockito.Mockito.*;

创建Mock对象

这里将会使用List作为测试的对象,主要原因是这个类比较常用,大家对接口也都比较熟悉。

在mockito中要mock一个对象很简单,只需要调用mock(Class<T>)方法即可。

List<String> mockedStringList = mock(List.class);#mock object creation

除了调用mock(Class<T>)创建mock对象,Mockito还提供使用annotation方式进行创建mock对象。对于使用annotation创建对象的方法会在以后的笔记中集中进行讲解,这里主要讨论mock对象以及基本使用。

使用Mock对象进行behavior verification

对mock对象进行行为检测,也就是查看mock对象的某些特定方法是否被使用了,以及被使用了几次。在mockito中,通过verify(T)方法来进行behavior verification。这个方法会返回T对象本身,需要紧接了调用某个特定的方法来判断这个特定的方法是否得到了调用。

List<String> mockedStringList = mock(List.class);#mock object creation… 185 more words

Tutorial

Let the Arranged Marriage Bashing Begin!

In the time span of only two days, I saw two posts on the walls of my friends that mocks arranged marriage. Generally, I get the humor, but these posts did not make me laugh. 837 more words

Life

Ben Simmons vs. Brandon Ingram

Photo Credit: espn.com

Most likely, either Louisiana State small forward/power forward Ben Simmons or Duke small forward Brandon Ingram will be taken with the number 1 overall pick in the 2016 NBA draft. 311 more words

Sports

Does Not Bode Well...

My sister and I went into the Patisserie today.

I opted for an egg and lettuce sandwich. The fellow asked if I wanted a knife and fork to eat it with. 186 more words