public void LoginOperation() { CustomerService service = new CustomerService(); string pass = "******"; byte[] bb = Encoding.UTF8.GetBytes(pass); RequestPersonalInformation request = new RequestPersonalInformation() { CUSTOMER_NAME = "john", CUSTOMER_SURNAME = "cluster", CUSTOMER_NUMBER = 1, EMAIL = "*****@*****.**", INSERT_USER = "******", IDENTIFICATION_ID = 79945571838, PHONE_NUMBER = "5357977315", UPDATE_USER = "******", GENDER = Enum.GetName(typeof(Enums.GENDER), 1), PASSWORD_HASH = bb, PASSWORD_SALT = bb, Header = new Header { Device = (int)DeviceEnum.Device.WEB, OperationTypes = (int)OperationType.OperationTypes.ADD, RequestId = Guid.NewGuid().ToString(), ApiKey = "U6l1hKzpZDrgfTaKxpQm3A/6raDiroAI7ueTgMNwhQs=" } }; LoginOperation op = new LoginOperation(request, service); op.Execute(); Assert.IsTrue(op.baseResponseMessage.header.IsSuccess); }
public PersonalInformationOperation(RequestPersonalInformation request, CustomerService service) { this.request.Header = new Header(); this.request = request; this.customerService = service; }
public void PersonalInformation() { AuthRepository repository = new AuthRepository(); CustomerService service = new CustomerService(); string pass = "******"; byte[] bb = Encoding.UTF8.GetBytes(pass); RequestPersonalInformation request = new RequestPersonalInformation() { CUSTOMER_NAME = "john", CUSTOMER_SURNAME = "cluster", CUSTOMER_NUMBER = 1, EMAIL = "*****@*****.**", INSERT_USER = "******", IDENTIFICATION_ID = 79945571838, PHONE_NUMBER = "5357977315", UPDATE_USER = "******", GENDER = Enum.GetName(typeof(Enums.GENDER), 1), PASSWORD_HASH = bb, Header = new Header { Device = (int)DeviceEnum.Device.WEB, OperationTypes = (int)OperationType.OperationTypes.ADD, RequestId = Guid.NewGuid().ToString(), ApiKey = "U6l1hKzpZDrgfTaKxpQm3A/6raDiroAI7ueTgMNwhQs=" } }; Task <ResponsePersonalInformation> response = repository.Register(request); Assert.IsTrue(response.IsCompletedSuccessfully); }
public async Task <ResponsePersonalInformation> Register(RequestPersonalInformation request) { PersonalInformationOperation op = new PersonalInformationOperation(request, service); op.Execute(); return(op.response); }
public async Task <BaseResponseMessage> Login(RequestPersonalInformation request) { LoginOperation op = new LoginOperation(request, service); op.Execute(); return(op.baseResponseMessage); }
public Task <ResponsePersonalInformation> CustomerInformationServiceAsync([FromBody] JObject json) { string jsonRequest = json.ToString(); RequestPersonalInformation request = new RequestPersonalInformation(); request = JsonConvert.DeserializeObject <RequestPersonalInformation>(jsonRequest); return(this.repository.Register(request)); }
public async Task <BaseResponseMessage> LoginService([FromBody] JObject json) { string jsonRequest = json.ToString(); RequestPersonalInformation request = new RequestPersonalInformation(); request = JsonConvert.DeserializeObject <RequestPersonalInformation>(jsonRequest); return(await this.repository.Login(request)); }
public bool CustomerOperation(RequestPersonalInformation request, out ResponsePersonalInformation response) { PersonalInformationOperation op = new PersonalInformationOperation(request); op.Execute(); response = op.response; if (!op.response.header.IsSuccess) { return(false); } return(true); }
public bool LoginOperation(RequestPersonalInformation request, out BaseResponseMessage response) { LoginOperation op = new LoginOperation(request); op.Execute(); response = op.baseResponseMessage; if (!response.header.IsSuccess) { return(false); } return(true); }
public LoginOperation(RequestPersonalInformation request, CustomerService customerService) : base(OperationCounter.LoginOperation) { this.request.Header = new Header(); this.request = request; this.customerService = customerService; }
public PersonalInformationOperation(RequestPersonalInformation request) { this.request.Header = new Header(); this.request = request; }
public LoginOperation(RequestPersonalInformation request) : base(OperationCounter.LoginOperation) { this.request.Header = new Header(); this.request = request; }