Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public static AuthUserBuilder FromUser(User user)
        {
            var registeredUserRole = RoleTestHelper.RegisteredUser().Build();

            return(FromUserAndRoles(user, registeredUserRole));
        }