protected static void testImm(Group g, Subject subj, Member m) {  Assert.assertTrue("g hasMember m",    g.hasMember(subj)); Assert.assertTrue("g hasImmMember m", g.hasImmediateMember(subj)); Assert.assertTrue("m isMember g",     m.isMember(g)); Assert.assertTrue("m isImmMember g",  m.isImmediateMember(g)); }
protected static void testImm( GrouperSession s, Group g, Subject subj, String list ) { try { Field   f = FieldFinder.find(list); Member  m = MemberFinder.findBySubject(s, subj); Assert.assertTrue("m.subj == subj", m.getSubject().equals(subj)); Assert.assertTrue("g hasMember"   , g.hasMember(subj, f)); Assert.assertTrue("g hasImmMember", g.hasImmediateMember(subj, f)); Assert.assertTrue("m isMember"    , m.isMember(g, f)); Assert.assertTrue("m isImmMember" , m.isImmediateMember(g, f)); Membership ms = MembershipFinder.findImmediateMembership( s, g, subj, f ); Assert.assertNotNull("found ms", ms); Assert.assertTrue("ms group   " , ms.getGroup().equals(g) ); Assert.assertTrue("ms member"   , ms.getMember().equals(m)); Assert.assertTrue("ms list"     , ms.getList().equals(f)  ); Assert.assertTrue("ms depth"    , ms.getDepth() == 0      ); try { Group via = ms.getViaGroup(); Assert.fail("imm ms has via group"); } catch (GroupNotFoundException eGNF) { Assert.assertTrue("imm ms has no via group", true); } } catch (Exception e) { Assert.fail(e.getMessage()); } }
  protected static void testImm(Group g, Subject subj, Member m) {    // The basics    Assert.assertTrue("g hasMember m",    g.hasMember(subj));    Assert.assertTrue("g hasImmMember m", g.hasImmediateMember(subj));    Assert.assertTrue("m isMember g",     m.isMember(g));    Assert.assertTrue("m isImmMember g",  m.isImmediateMember(g));  } // protected static TestImm(g, m)