public static void Init(TestContext context) { _loginService = new UserLoginAppService<UserDto, User>(); _registerService = new UserRegisterAppService<UserDto, User>(); _registerService.RegisterUser(UserName, ContainerHelper.Resolve<IMd5Encryptor>().Encrypt(Password)); }
public static void Init(TestContext context) { _loginService = new UserLoginAppService<UserDto, User>(); _registerService = new UserRegisterAppService<UserDto, User>(); _securityService = new UserSecurityAppService(); // 注册一个测试使用账号 string username = "******"; string password = "******"; _userId = _registerService.RegisterUser(username, ContainerHelper.Resolve<IMd5Encryptor>().Encrypt(password)).Id; }
public static void Init(TestContext context) { _loginService = new UserLoginAppService<UserDto, User>(); IUserFactory<User> factory = new UserFactory(); _registerService = new UserRegisterAppService<UserDto, User>(); var dto = _registerService.RegisterUser(UserName, ContainerHelper.Resolve<IMd5Encryptor>().Encrypt(Password)); _userId = dto.Id; _manageService = new UserManageAppService(); }