public void GetTransactions_ReturnsStatus200() { Vpos merchant = CreateDefaultVpos(); var response = merchant.GetTransactions(); Assert.Equal(200, response.StatusCode); }
public void GetTransaction_ReturnsStatus200() { Vpos merchant = CreateDefaultVpos(); Response response = merchant.GetTransaction("1jYQryG3Qo4nzaOKgJxzWDs25Ht"); Assert.Equal(200, response.StatusCode); }
public void NewRefund_NullParentTransactionID_ReturnsStatus400() { Vpos merchant = CreateDefaultVpos(); var response = merchant.NewRefund(null); Assert.Equal(400, response.StatusCode); }
public void NewPayment_CustomerAndAmount_ReturnsStatus202() { Vpos merchant = CreateDefaultVpos(); var response = merchant.NewPayment("992563019", "123.45"); Assert.Equal(202, response.StatusCode); }
public void NewRefund_ParentTransactionID_ReturnsStatus202() { Vpos merchant = CreateDefaultVpos(); var response = merchant.NewRefund("1jYQryG3Qo4nzaOKgJxzWDs25Hv"); Assert.Equal(202, response.StatusCode); }
//Vposでソートする public int CompareTo(NicoNicoCommentEntry obj) { if (Vpos == obj.Vpos) { return(No.CompareTo(obj.No)); } return(Vpos.CompareTo(obj.Vpos)); }
public void GetTransaction_NonExistentTransactionID_ReturnsStatus404() { Vpos merchant = CreateDefaultVpos(); const string TRANSACTION_ID = "1jYQryG3Q"; var response = merchant.GetTransaction(TRANSACTION_ID); Assert.Equal(404, response.StatusCode); }
public void NewRefund_InvalidSupervisorCard_ReturnsStatus400() { Vpos merchant = CreateDefaultVpos(); const string INVALID_SUPERVISOR_CARD = ""; var response = merchant.NewRefund("1jYQryG3Qo4nzaOKgJxzWDs25Hv", supervisorCard: INVALID_SUPERVISOR_CARD); Assert.Equal(400, response.StatusCode); }
public void NewPayment_InvalidAmountFormat_ReturnsStatus400() { Vpos merchant = CreateDefaultVpos(); const string INVALID_FORMAT_AMOUNT = "123.45.01"; var response = merchant.NewPayment("992563019", INVALID_FORMAT_AMOUNT); Assert.Equal(400, response.StatusCode); }
public void NewPayment_InvalidCustomer_ReturnsStatus400() { Vpos merchant = CreateDefaultVpos(); const string INVALID_PHONE_NUMBER = "99256301"; var response = merchant.NewPayment(INVALID_PHONE_NUMBER, "123.45"); Assert.Equal(400, response.StatusCode); }
int IComparable <NicoNicoCommentEntry> .CompareTo(NicoNicoCommentEntry obj) { if (Vpos == obj.Vpos) { return(Number.CompareTo(obj.Number)); } return(Vpos.CompareTo(obj.Vpos)); }
public void GetRequest_NewPayment_Returns200() { Vpos merchant = CreateDefaultVpos(); var paymentResponse = merchant.NewPayment("992563019", "123.45"); var requestId = Utils.GetRequestId(paymentResponse.Location); var response = merchant.GetRequest(requestId); Assert.Equal(200, response.StatusCode); }
public void GetTransaction_ReturnsStatus200() { Vpos merchant = CreateDefaultVpos(); var transaction = merchant.NewPayment("992563019", "123.45"); var transactionId = Utils.GetRequestId(transaction.Location); Response response = merchant.GetTransaction(transactionId); Assert.Equal(200, response.StatusCode); }