public static Faker <Guild> LeaderOnly(Guid?id = null) { var guild = NoMembers(id).Generate(); var leader = MemberFake.WithoutGuild().Generate(); var invite = guild.InviteMember(leader, TestModelFactoryHelper.Factory) .BeAccepted(TestModelFactoryHelper.Factory); return(new Faker <Guild>().CustomInstantiator(_ => guild)); }
public static Faker <Invite> InvalidWithoutGuild() { var member = MemberFake.WithoutGuild().Generate(); return(new Faker <Invite>().CustomInstantiator(_ => new InviteTestProxy { Id = Guid.NewGuid(), member = member, MemberId = member.Id })); }
public static Faker <Guild> Complete(Guid?id = null, int membersCount = 2) { membersCount = Math.Max(2, membersCount); return(new Faker <Guild>().CustomInstantiator(_ => { var guild = NoMembers().Generate(); foreach (var member in MemberFake.WithoutGuild().Generate(membersCount)) { var invite = guild.InviteMember(member, TestModelFactoryHelper.Factory); invite.BeAccepted(TestModelFactoryHelper.Factory); } return guild; })); }