static void Main() { var container = new Bootstrapper().CreateAndConfigureContainer(); var userService = container.Resolve<UserService>(); var request = new ChangePasswordRequest { UserId = 1, NewPassword = "******" }; //VALID REQUEST //var request = new ChangePasswordRequest { UserId = 1 }; //INVALID - EMPTY PASSWORD //var request = new ChangePasswordRequest { UserId = 666, NewPassword = "******" }; //INVALID - WRONG USER ID //var request = new ChangePasswordRequest { UserId = 1, NewPassword = "******" }; //INVALID - TOO SHORT PASSWORD var result = userService.ChangePassword(request); DisplayResult(result); System.Console.ReadKey(); }
private static UserService GetUserService() { var container = new Bootstrapper().CreateAndConfigureContainer(); return container.Resolve<UserService>(); }