Esempio n. 1
0
        public bool sign(string openid)
        {
            UsersApp userapp = new UsersApp();

            if (userapp.Exist(openid) > 0)
            {
                return(true);
            }
            else
            {
                return(true);
            }
        }
Esempio n. 2
0
        public void GetUserInfoTest()
        {
            using (new TransactionScope(TransactionScopeOption.RequiresNew))
                using (TimeTrackerDbContext dbContext = CreateTestContext()) {
                    // Arrange
                    string domainName = @"CORP\Maxim.Rozhkov";
                    int    userId     = 1091;
                    string email      = "*****@*****.**";
                    var    app        = new UsersApp(new UsersRepository(dbContext));

                    // Act
                    var rc = app.GetUserInfo(domainName);

                    //Assert
                    Assert.AreEqual(userId, rc.Id);
                    Assert.AreEqual(domainName, rc.DomainDame);
                    Assert.AreEqual(email, rc.Email);
                }
        }
Esempio n. 3
0
 public AuthController(UsersApp usersApp, BotRepository botRepository)
 {
     _usersApp      = usersApp;
     _botRepository = botRepository;
 }