private void AssertCollectedUserItemEntities( user_item collectedItem, string expectedName, string expectedEnabled, params string[] expectedGroups) { ItemTypeEntityChecker.AssertItemTypeEntity(collectedItem.user, expectedName, "user"); ItemTypeEntityChecker.AssertItemTypeEntity(collectedItem.enabled, expectedEnabled, "enabled"); Assert.AreEqual(expectedGroups.Count(), collectedItem.group.Count(), "Unexpected amount of group was found."); for (int i = 0; i < expectedGroups.Count(); i++) { ItemTypeEntityChecker.AssertItemTypeEntity(collectedItem.group.ElementAt(i), expectedGroups.ElementAt(i), "group"); } }