public static AuthUserBuilder User(string name = "user") { var registeredUserRole = RoleTestHelper.RegisteredUser().Build(); return(new AuthUserBuilder() .WithId(IdTestHelper.NextForUser()) .WithUsername(new Username(name)) .WithEmail($"{name}@example.com") .WithPasswordHash(name) .WithCreatedAt(Feb29) .WithRoles(registeredUserRole)); }
public static AuthUserBuilder FromUser(User user) { var registeredUserRole = RoleTestHelper.RegisteredUser().Build(); return(FromUserAndRoles(user, registeredUserRole)); }