use of org.mamute.dao.InvisibleForUsersRule in project mamute by caelum.
the class InvisibleForUsersRuleTest method should_add_filter_if_user_is_not_logged_in.
@Test
public void should_add_filter_if_user_is_not_logged_in() {
LoggedUser user = new LoggedUser(null, null);
InvisibleForUsersRule invisibleForUsersRule = new InvisibleForUsersRule(user);
invisibleForUsersRule.addFilter("x", criteria);
verify(criteria, only()).add(Mockito.any(Criterion.class));
}
use of org.mamute.dao.InvisibleForUsersRule in project mamute by caelum.
the class IndexSyncJob method generateUser.
private InvisibleForUsersRule generateUser() {
User user = new User(fromTrustedText("System"), "system");
LoggedUser loggedUser = new LoggedUser(user, null);
return new InvisibleForUsersRule(loggedUser);
}
Aggregations