public bool TestMustPayMembersPrice(int price, bool hasPaidMembership) { var options = new EventSignupOptions { PriceForMembers = price }; var user = new User { Payments = { Payment(membership: hasPaidMembership) } }; return(user.MustPayMembersPrice(options)); }
public bool TestMustPayMembersFee(bool requiresMembership, bool hasPaidMembership) { var options = new EventSignupOptions { RequiresMembershipFee = requiresMembership }; var user = new User { Payments = { Payment(membership: hasPaidMembership) } }; return(user.MustPayMembershipFee(options)); }
public bool TestMembershipIncludedInTrainingFee(bool includedInTrainingFee, bool hasPaidTrainingFee) { var options = new EventSignupOptions { IncludedInTrainingFee = includedInTrainingFee, PriceForMembers = 100 }; var user = new User { Payments = { Payment(training: hasPaidTrainingFee, membership: true) } }; return(user.MustPayMembersPrice(options)); }
public bool TestNonMembershipIncludedInClassesFee(bool includedInClassesFee, bool hasPaidClassesFee) { var options = new EventSignupOptions { IncludedInClassesFee = includedInClassesFee, PriceForNonMembers = 100 }; var user = new User { Payments = { Payment(classes: hasPaidClassesFee) } }; return(user.MustPayNonMembersPrice(options)); }
public bool TestMustPayClassesFee(bool requiresClassesFee, bool hasPaidClassesFee, bool exemptFromClassesFee) { var options = new EventSignupOptions { RequiresClassesFee = requiresClassesFee }; var user = new User { ExemptFromClassesFee = exemptFromClassesFee, Payments = { Payment(classes: hasPaidClassesFee) } }; return(user.MustPayClassesFee(options)); }
public bool TestMustPayTrainingFee(bool requiresTrainingFee, bool hasPaidTrainingFee, bool exemptFromTrainingFee) { var options = new EventSignupOptions { RequiresTrainingFee = requiresTrainingFee }; var user = new User { ExemptFromTrainingFee = exemptFromTrainingFee, Payments = { Payment(training: hasPaidTrainingFee) } }; return(user.MustPayTrainingFee(options)); }
public static bool MustPayClassesFee(this MemberUser user, EventSignupOptions options) => options.RequiresClassesFee && !user.HasPayedClassesFeeThisSemester() && !user.ExemptFromClassesFee;
public static bool MustPayTrainingFee(this MemberUser user, EventSignupOptions options) => options.RequiresTrainingFee && !user.HasPayedTrainingFeeThisSemester() && !user.ExemptFromTrainingFee;
public static bool MustPayMembershipFee(this MemberUser user, EventSignupOptions options) => options.RequiresMembershipFee && !user.HasPayedMembershipThisYear();
public static bool MustPayMembersPrice(this MemberUser user, EventSignupOptions options) => options.PriceForMembers > 0 && user.HasPayedMembershipThisYear();