Code example for Member

Methods: getName

0
		filter = new NameMemberFilter(".*Member.*");
	} 
 
	@Test 
	public void shouldAcceptMemberIfNameMatches() { 
		when(member.getName()).thenReturn("Member");
		assertTrue(filter.accept(member));
 
		when(member.getName()).thenReturn("MemberFilter");
		assertTrue(filter.accept(member));
 
		when(member.getName()).thenReturn("MyMember");
		assertTrue(filter.accept(member));
	} 
 
	@Test 
	public void shouldNotAcceptMemberIfNameDoesNotMatch() { 
		when(member.getName()).thenReturn("ember");
		assertFalse(filter.accept(member));
 
		when(member.getName()).thenReturn("Memb");