public void UpdateMerchant_Success() { App createdApp = _appService.CreateApp(new CreateAppRequest()).Content; IPaylikeMerchantService merchantService = new PaylikeMerchantService(createdApp.Key); Merchant createdMerchant = merchantService.CreateMerchant(_createMerchantRequest).Content; merchantService.UpdateMerchant(new UpdateMerchantRequest() { MerchantId = createdMerchant.Id, Email = "*****@*****.**", Name = "new_name", Descriptor = "newDesc" }); Merchant gotMerchant = merchantService.GetMerchant(new GetMerchantRequest() { MerchantId = createdMerchant.Id }).Content; Assert.AreEqual(gotMerchant.Name, "new_name"); Assert.AreEqual(gotMerchant.Email, "*****@*****.**"); Assert.AreEqual(gotMerchant.Descriptor, "newDesc"); }
public void GetMerchant_Success() { App createdApp = _appService.CreateApp(new CreateAppRequest()).Content; IPaylikeMerchantService merchantService = new PaylikeMerchantService(createdApp.Key); Merchant createdMerchant = merchantService.CreateMerchant(_createMerchantRequest).Content; Merchant gotMerchant = merchantService.GetMerchant(new GetMerchantRequest() { MerchantId = createdMerchant.Id }).Content; Assert.AreEqual(gotMerchant.Name, createdMerchant.Name); Assert.AreEqual(gotMerchant.Currency, createdMerchant.Currency); Assert.AreEqual(gotMerchant.Test, createdMerchant.Test); Assert.AreEqual(gotMerchant.Email, createdMerchant.Email); Assert.AreEqual(gotMerchant.Website, createdMerchant.Website); Assert.AreEqual(gotMerchant.Descriptor, createdMerchant.Descriptor); Assert.AreEqual(gotMerchant.Company.Country, createdMerchant.Company.Country); Assert.AreEqual(gotMerchant.Company.Number, createdMerchant.Company.Number); Assert.AreEqual(gotMerchant.Bank.IBAN, createdMerchant.Bank.IBAN); }