public static RoleBuilder Admin() { return(new RoleBuilder() .WithId(IdTestHelper.Next()) .WithRolename(Role.ADMIN_ROLENAME) .WithCreatedAt(Feb29) .WithPermissions(Permissions.All.Except(Permissions.IgnoredByAdmins))); }
public static RoleBuilder RegisteredUser() { return(new RoleBuilder() .WithId(IdTestHelper.Next()) .WithRolename(Role.REGISTERED_USER_ROLENAME) .WithCreatedAt(Feb29) .WithPermissions(Permissions.PlayGame)); }
public static RoleBuilder PendingRegistration() { return(new RoleBuilder() .WithId(IdTestHelper.Next()) .WithRolename(Role.PENDING_REGISTRATION_ROLENAME) .WithCreatedAt(Feb29) .WithPermissions(Permissions.PendingRegistration)); }
public static PlayerBuilder FromUser(User user) { return(new PlayerBuilder() .WithId(IdTestHelper.Next()) .WithUserId(user.Id) .WithUsername(user.Username) .WithRank(user.Rank) .WithColor(Color.Black) .WithCreatedAt(user.CreatedAt)); }
public static PlayerBuilder Black() { return(new PlayerBuilder() .WithId(IdTestHelper.Next()) .WithUserId(IdTestHelper.Next()) .WithUsername("Black player") .WithRank(Rank.Ranks.Private) .WithColor(Color.Black) .WithCreatedAt(Feb29)); }