private void TestToMember(CommunityTestData fromData, bool isFromDeleted, CommunityTestData toData, bool isToDeleted, string expectedSnippet, string expectedHeaderSnippet) { var inviter = CreateInviter(fromData, isFromDeleted); // Invite member. var invitee = _memberAccountsCommand.CreateTestMember(1); if (toData != null) { var community = toData.CreateTestCommunity(_communitiesCommand, _verticalsCommand, _contentEngine); if (isToDeleted) { var vertical = _verticalsCommand.GetVertical(community); vertical.IsDeleted = true; _verticalsCommand.UpdateVertical(vertical); } _memberAffiliationsCommand.SetAffiliation(invitee.Id, community.Id); } var invitation = new FriendInvitation { InviterId = inviter.Id, InviteeId = invitee.Id }; _memberFriendsCommand.SendInvitation(invitation); // Check. var email = _emailServer.AssertEmailSent(); email.AssertAddresses(inviter, Return, invitee); AssertEmail(email, expectedSnippet, expectedHeaderSnippet); }
public void TestVerticalCanonicalLink() { var community = TestCommunity.Gta.CreateTestCommunity(_communitiesCommand, _verticalsCommand, _contentEngine); var vertical = _verticalsCommand.GetVertical(community); TestCanonicalLink(vertical, ""); TestCanonicalLink(vertical, "jobs"); TestCanonicalLink(vertical, "guests/Friends.aspx"); TestCanonicalLink(vertical, "members/resources"); }
private Vertical GetVertical(Guid?affiliateId) { if (affiliateId == null) { return(null); } var vertical = _verticalsCommand.GetVertical(affiliateId.Value); if (vertical == null) { return(null); } return(vertical.IsDeleted ? null : vertical); }
public ActionResult Edit(Guid id) { var community = _communitiesQuery.GetCommunity(id); if (community == null) { return(NotFound("community", "id", id)); } var vertical = _verticalsCommand.GetVertical(id); if (vertical == null) { return(NotFound("vertical", "id", id)); } return(View(new CommunityModel { Community = community, Vertical = vertical, Countries = _locationQuery.GetCountries() })); }
public static ReadOnlyUrl GetCommunityPathUrl(this IVerticalsCommand verticalsCommand, Community community, string path) { return(verticalsCommand.GetVertical(community).GetVerticalPathUrl(path)); }
public static ReadOnlyUrl GetCommunityHostUrl(this IVerticalsCommand verticalsCommand, Community community, bool secure, string path) { return(verticalsCommand.GetVertical(community).GetVerticalHostUrl(secure, path)); }
public static Vertical GetVertical(this IVerticalsCommand verticalsCommand, Community community) { return(verticalsCommand.GetVertical(community.Id)); }
private Vertical CreateVertical() { var community = TestCommunity.LiveInAustralia.CreateTestCommunity(_communitiesCommand, _verticalsCommand, _contentEngine); return(_verticalsCommand.GetVertical(community)); }