public bool sign(string openid) { UsersApp userapp = new UsersApp(); if (userapp.Exist(openid) > 0) { return(true); } else { return(true); } }
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); } }
public AuthController(UsersApp usersApp, BotRepository botRepository) { _usersApp = usersApp; _botRepository = botRepository; }