public void OrganizationUser_Fetch_Info_List() { OrganizationUserTestHelper.OrganizationUserAdd(); OrganizationUserTestHelper.OrganizationUserAdd(); var organizationUserMembers = OrganizationUserRepository.OrganizationUserFetchInfoList(new OrganizationUserMemberDataCriteria()); Assert.IsTrue(organizationUserMembers.Count() > 1, "Row returned should be greater than one"); }
public void OrganizationUser_Fetch() { var organizationUserMember = OrganizationUserTestHelper.OrganizationUserNew(); organizationUserMember = OrganizationUserRepository.OrganizationUserSave(organizationUserMember); organizationUserMember = OrganizationUserRepository.OrganizationUserFetch(organizationUserMember.OrganizationUserMemberId); Assert.IsTrue(organizationUserMember != null, "Row returned should not equal null"); }
public void OrganizationUser_Add() { var organizationUserMember = OrganizationUserTestHelper.OrganizationUserNew(); Assert.IsTrue(organizationUserMember.IsValid, "IsValid should be true"); organizationUserMember = OrganizationUserRepository.OrganizationUserSave(organizationUserMember); Assert.IsTrue(organizationUserMember.OrganizationUserMemberId != 0, "OrganizationUserMemberId should be a non-zero value"); OrganizationUserRepository.OrganizationUserFetch(organizationUserMember.OrganizationUserMemberId); }
public void OrganizationUser_Edit() { var organizationUserMember = OrganizationUserTestHelper.OrganizationUserNew(); var roleId = organizationUserMember.RoleId; Assert.IsTrue(organizationUserMember.IsValid, "IsValid should be true"); organizationUserMember = OrganizationUserRepository.OrganizationUserSave(organizationUserMember); organizationUserMember = OrganizationUserRepository.OrganizationUserFetch(organizationUserMember.OrganizationUserMemberId); organizationUserMember.RoleId = (int)Role.Reviewer; organizationUserMember = OrganizationUserRepository.OrganizationUserSave(organizationUserMember); organizationUserMember = OrganizationUserRepository.OrganizationUserFetch(organizationUserMember.OrganizationUserMemberId); Assert.IsTrue(organizationUserMember.RoleId != roleId, "RoleId should have different value"); }
public void OrganizationUser_Delete() { var organizationUserMember = OrganizationUserTestHelper.OrganizationUserNew(); Assert.IsTrue(organizationUserMember.IsValid, "IsValid should be true"); organizationUserMember = OrganizationUserRepository.OrganizationUserSave(organizationUserMember); organizationUserMember = OrganizationUserRepository.OrganizationUserFetch(organizationUserMember.OrganizationUserMemberId); OrganizationUserRepository.OrganizationUserDelete(organizationUserMember.OrganizationUserMemberId); try { OrganizationUserRepository.OrganizationUserFetch(organizationUserMember.OrganizationUserMemberId); } catch (Exception ex) { Assert.IsTrue(ex.GetBaseException() is InvalidOperationException); } }