public void test_EnumerateGroups() { MQConnection con = null; try { con = connectToServer(address, null, null); addAllGroups(con); List <string> gnames = new List <string>(); ErrorCode ec = con.EnumerateGroups(gnames); Assert.IsTrue(ec == ErrorCode.EC_NOERROR, "Couldn't enumerate groups"); for (int x = 0; x < TEST_GROUPS.Length; x++) { bool found = false; for (int y = 0; y < gnames.Count; y++) { string group = gnames[y]; if (group.Equals(TEST_GROUPS[x])) { found = true; } } Assert.IsTrue(found, "Group not enumerated: " + TEST_GROUPS[0]); } } finally { if (con != null) { con.Close(); } } }