Exemplo n.º 1
0
        protected Guid GetUserId(PlayCatDbContext context)
        {
            string password = "******";
            string email    = "*****@*****.**";

            User      user      = context.CreateUser(email, "test", "test", "m", password);
            AuthToken authToken = context.CreateToken(DateTime.Now.AddDays(-1), false, user.Id);

            context.SaveChanges();

            return(user.Id);
        }
Exemplo n.º 2
0
        private new Guid GetUserId(PlayCatDbContext context)
        {
            string password = "******";
            string email    = "*****@*****.**";

            User      user      = context.CreateUser(email, "test", "test", "m", password);
            Playlist  playlist  = context.CreatePlaylist(true, user.Id, "General", 0);
            AuthToken authToken = context.CreateToken(DateTime.Now.AddDays(-1), false, user.Id);

            context.SaveChanges();

            return(user.Id);
        }
Exemplo n.º 3
0
        protected Guid GetUserId(PlayCatDbContext context)
        {
            var inviteService = _server.Host.Services.GetService(typeof(IInviteService)) as IInviteService;

            string password = "******";
            string email    = "*****@*****.**";

            DataModel.User      user      = context.CreateUser(email, "test", "test", "m", password, inviteService.GenerateInvite());
            DataModel.AuthToken authToken = context.CreateToken(DateTime.Now.AddDays(-1), false, user.Id);

            context.SaveChanges();

            return(user.Id);
        }