public void SquareBracketOperator() { AuthorityDataTypeList newAuthorityDataTypeList, oldAuthorityDataTypeList; Int32 authorityDataTypeIndex; // Test all authorityDataTypes oldAuthorityDataTypeList = GetAuthorityDataTypes(true); newAuthorityDataTypeList = new AuthorityDataTypeList(); for (authorityDataTypeIndex = 0; authorityDataTypeIndex < oldAuthorityDataTypeList.Count; authorityDataTypeIndex++) { newAuthorityDataTypeList.Add(oldAuthorityDataTypeList[oldAuthorityDataTypeList.Count - authorityDataTypeIndex - 1]); } for (authorityDataTypeIndex = 0; authorityDataTypeIndex < oldAuthorityDataTypeList.Count; authorityDataTypeIndex++) { Assert.AreEqual(newAuthorityDataTypeList[authorityDataTypeIndex], oldAuthorityDataTypeList[oldAuthorityDataTypeList.Count - authorityDataTypeIndex - 1]); } // Test all selectecd by application id authorityDataTypes oldAuthorityDataTypeList = GetAuthorityDataTypesByApplicationId(true); newAuthorityDataTypeList = new AuthorityDataTypeList(); for (authorityDataTypeIndex = 0; authorityDataTypeIndex < oldAuthorityDataTypeList.Count; authorityDataTypeIndex++) { newAuthorityDataTypeList.Add(oldAuthorityDataTypeList[oldAuthorityDataTypeList.Count - authorityDataTypeIndex - 1]); } for (authorityDataTypeIndex = 0; authorityDataTypeIndex < oldAuthorityDataTypeList.Count; authorityDataTypeIndex++) { Assert.AreEqual(newAuthorityDataTypeList[authorityDataTypeIndex], oldAuthorityDataTypeList[oldAuthorityDataTypeList.Count - authorityDataTypeIndex - 1]); } }
public void Constructor() { AuthorityDataTypeList addressTypes; addressTypes = new AuthorityDataTypeList(); Assert.IsNotNull(addressTypes); }
private AuthorityDataTypeList GetAuthorityDataTypesByApplicationId(Boolean refresh) { if (_authorityDataTypes.IsNull() || refresh) { _authorityDataTypes = CoreData.UserManager.GetAuthorityDataTypesByApplicationId(GetUserContext(), Settings.Default.TestApplicationId); } return(_authorityDataTypes); }
private AuthorityDataTypeList GetAuthorityDataTypes(Boolean refresh) { if (_authorityDataTypes.IsNull() || refresh) { _authorityDataTypes = CoreData.UserManager.GetAuthorityDataTypes(GetUserContext()); } return(_authorityDataTypes); }
public AuthorityDataTypeListTest() { _authorityDataTypes = null; }