Ejemplo n.º 1
0
        public void CreateClientAndApi()
        {
            ClientRegistrationModel clientRegistration = new ClientRegistrationModel().GetTestModel();

            ClientAccount = lykkeApi.ClientAccount.Clients.PostRegister(clientRegistration).GetResponseObject();

            api = lykkeApi.ClientAccount.ClientSettings;
        }
Ejemplo n.º 2
0
 public static void Validate(AccountRegistrationModel accountRegistrationModel,
                             ClientAccountInformation clientAccountInformation)
 {
     Assert.Multiple(() =>
     {
         Assert.AreEqual(accountRegistrationModel.Email, clientAccountInformation.Email, "Wrong email");
         Assert.AreEqual(accountRegistrationModel.ContactPhone, clientAccountInformation.Phone, "Wrong email");
     });
 }
Ejemplo n.º 3
0
 public static void Validate(ClientRegistrationModel clientRegistration, ClientAccountInformation clientAccountInformation)
 {
     Assert.Multiple(() =>
     {
         Assert.AreEqual(clientRegistration.Email, clientAccountInformation.Email, "Wrong email");
         Assert.AreEqual(clientRegistration.Phone, clientAccountInformation.Phone, "Wrong email");
         Assert.AreEqual(clientRegistration.PartnerId, clientAccountInformation.PartnerId, "Wrong PartnerId");
     });
 }
Ejemplo n.º 4
0
        public void RegisterClientAndPartner()
        {
            partner = new Partner().GetTestModel();
            lykkeApi.ClientAccount.Partners.PostPartners(partner);

            clientWithPartner = lykkeApi.ClientAccount.Clients
                                .PostRegister(new ClientRegistrationModel().GetTestModel(partner.PublicId)).GetResponseObject();
            clientWithOutPartner = lykkeApi.ClientAccount.Clients
                                   .PostRegister(new ClientRegistrationModel().GetTestModel()).GetResponseObject();
        }
Ejemplo n.º 5
0
        public void CreateClients()
        {
            nonExistedClient = new ClientRegistrationModel().GetTestModel();
            existedClient    = lykkeApi.ClientAccount.Clients
                               .PostRegister(new ClientRegistrationModel().GetTestModel()).GetResponseObject();

            partner = new Partner().GetTestModel();
            nonExistedClientWithPartnerId = new ClientRegistrationModel().GetTestModel(partner.PublicId);
            existedClientWithPartnerId    = lykkeApi.ClientAccount.Clients
                                            .PostRegister(new ClientRegistrationModel().GetTestModel(partner.PublicId)).GetResponseObject();
        }
Ejemplo n.º 6
0
        public void GetPartnerWithUsersCountTest()
        {
            var clientRegistration = new ClientRegistrationModel().GetTestModel(partner.PublicId);

            clientAccount = lykkeApi.ClientAccount.Clients.PostRegister(clientRegistration).GetResponseObject();

            var getUserCount = api.GetPartnerUserCount(partner.PublicId);

            Assert.That(getUserCount.StatusCode, Is.EqualTo(HttpStatusCode.OK));
            Assert.That(getUserCount.GetResponseObject().Count, Is.EqualTo(1));
        }
Ejemplo n.º 7
0
        public void CreatePartnerAndClientAndApi()
        {
            api     = lykkeApi.ClientAccount.ClientAccountInformation;
            partner = new Partner().GetTestModel();
            lykkeApi.ClientAccount.Partners.PostPartners(partner);

            clientRegistration = new ClientRegistrationModel().GetTestModel(partner.PublicId);
            account            = lykkeApi.ClientAccount.Clients.PostRegister(clientRegistration)
                                 .GetResponseObject();
            lykkeApi.ClientAccount.ClientAccountInformation.PostSetPIN(account.Id, pin);
            account.Pin = pin;
        }
Ejemplo n.º 8
0
        public void GetUsersCountByPartnerIdTest()
        {
            var getUsersCountForAccount = api.GetUsersCountByPartnerId(partner.PublicId);

            Assert.That(getUsersCountForAccount.StatusCode, Is.EqualTo(HttpStatusCode.OK));
            Assert.That(getUsersCountForAccount.GetResponseObject(), Is.EqualTo(1));

            newAccount = lykkeApi.ClientAccount.Clients.PostRegister(newAccountReg).GetResponseObject();

            getUsersCountForAccount = api.GetUsersCountByPartnerId(partner.PublicId);
            Assert.That(getUsersCountForAccount.GetResponseObject(), Is.EqualTo(2));
        }