Search in sources :

Example 1 with BrutalAds

use of org.mamute.ads.BrutalAds in project mamute by caelum.

the class BrutalAdsTest method should_return_true_if_user_have_less_then_50_karma.

@Test
public void should_return_true_if_user_have_less_then_50_karma() {
    User user = user("Leo", "leo@leo.com");
    user.increaseKarma(20);
    LoggedUser loggedUser = new LoggedUser(user, null);
    BrutalAds brutalAds = new BrutalAds(loggedUser);
    assertTrue(brutalAds.shouldShowAds());
}
Also used : User(org.mamute.model.User) LoggedUser(org.mamute.model.LoggedUser) BrutalAds(org.mamute.ads.BrutalAds) LoggedUser(org.mamute.model.LoggedUser) Test(org.junit.Test)

Example 2 with BrutalAds

use of org.mamute.ads.BrutalAds in project mamute by caelum.

the class BrutalAdsTest method should_return_true_if_user_not_logged.

@Test
public void should_return_true_if_user_not_logged() {
    LoggedUser loggedUser = new LoggedUser(null, null);
    BrutalAds brutalAds = new BrutalAds(loggedUser);
    assertTrue(brutalAds.shouldShowAds());
}
Also used : BrutalAds(org.mamute.ads.BrutalAds) LoggedUser(org.mamute.model.LoggedUser) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 BrutalAds (org.mamute.ads.BrutalAds)2 LoggedUser (org.mamute.model.LoggedUser)2 User (org.mamute.model.User)1