Ejemplo n.º 1
0
        public void GetTransactions_ReturnsStatus200()
        {
            Vpos merchant = CreateDefaultVpos();

            var response = merchant.GetTransactions();

            Assert.Equal(200, response.StatusCode);
        }
Ejemplo n.º 2
0
        public void GetTransaction_ReturnsStatus200()
        {
            Vpos merchant = CreateDefaultVpos();

            Response response = merchant.GetTransaction("1jYQryG3Qo4nzaOKgJxzWDs25Ht");

            Assert.Equal(200, response.StatusCode);
        }
Ejemplo n.º 3
0
        public void NewRefund_NullParentTransactionID_ReturnsStatus400()
        {
            Vpos merchant = CreateDefaultVpos();

            var response = merchant.NewRefund(null);

            Assert.Equal(400, response.StatusCode);
        }
Ejemplo n.º 4
0
        public void NewPayment_CustomerAndAmount_ReturnsStatus202()
        {
            Vpos merchant = CreateDefaultVpos();

            var response = merchant.NewPayment("992563019", "123.45");

            Assert.Equal(202, response.StatusCode);
        }
Ejemplo n.º 5
0
        public void NewRefund_ParentTransactionID_ReturnsStatus202()
        {
            Vpos merchant = CreateDefaultVpos();

            var response = merchant.NewRefund("1jYQryG3Qo4nzaOKgJxzWDs25Hv");

            Assert.Equal(202, response.StatusCode);
        }
Ejemplo n.º 6
0
        //Vposでソートする
        public int CompareTo(NicoNicoCommentEntry obj)
        {
            if (Vpos == obj.Vpos)
            {
                return(No.CompareTo(obj.No));
            }

            return(Vpos.CompareTo(obj.Vpos));
        }
Ejemplo n.º 7
0
        public void GetTransaction_NonExistentTransactionID_ReturnsStatus404()
        {
            Vpos         merchant       = CreateDefaultVpos();
            const string TRANSACTION_ID = "1jYQryG3Q";

            var response = merchant.GetTransaction(TRANSACTION_ID);

            Assert.Equal(404, response.StatusCode);
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
        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);
        }
Ejemplo n.º 10
0
        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);
        }
Ejemplo n.º 11
0
        int IComparable <NicoNicoCommentEntry> .CompareTo(NicoNicoCommentEntry obj)
        {
            if (Vpos == obj.Vpos)
            {
                return(Number.CompareTo(obj.Number));
            }

            return(Vpos.CompareTo(obj.Vpos));
        }
Ejemplo n.º 12
0
        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);
        }
Ejemplo n.º 13
0
        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);
        }