Permalink
Browse files

more ruby convention changes.....

  • Loading branch information...
arch85 committed Feb 29, 2012
1 parent 131dadf commit c58c404627074c58a54739d35003432b2e711689
@@ -43,7 +43,7 @@ def test_simple_credit_with_card
assert_equal('Valid Format', response.message)
end
- def test_simpleCredit_withpaypal
+ def test_simple_credit_with_paypal
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -59,7 +59,7 @@ def test_simpleCredit_withpaypal
assert(response.message =~ /Error validating xml data against the schema/)
end
- def test_illegalorderID
+ def test_illegal_order_id
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -77,7 +77,7 @@ def test_illegalorderID
assert(response.message =~ /Error validating xml data against the schema/)
end
- def test_FieldsOutOfOrder
+ def test_fields_out_of_order
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -95,7 +95,7 @@ def test_FieldsOutOfOrder
assert_equal('Valid Format', response.message)
end
- def test_InvalidField
+ def test_invalid_field
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -113,7 +113,7 @@ def test_InvalidField
assert_equal('Valid Format', response.message)
end
- def test_payPalNotes
+ def test_pay_pal_notes
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -131,7 +131,7 @@ def test_payPalNotes
assert_equal('Valid Format', response.message)
end
- def test_processingInstructionsandAmexdata
+ def test_processing_instructions_and_amex_data
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -34,21 +34,21 @@ def test_simple_echeckcredit
'litleTxnId'=>'123456789101112',
'amount'=>'12'
}
- response= LitleOnlineRequest.new.echeckCredit(hash)
+ response= LitleOnlineRequest.new.echeck_credit(hash)
assert_equal('Valid Format', response.message)
end
- def test_noAmount
+ def test_no_amount
hash = {
'merchantId' => '101',
'version'=>'8.8',
'reportGroup'=>'Planets',
}
- response = LitleOnlineRequest.new.echeckCredit(hash)
+ response = LitleOnlineRequest.new.echeck_credit(hash)
assert_match /The content of element 'echeckCredit' is not complete/, response.message
end
- def test_echeckCredit_withecheck
+ def test_echeck_credit_with_echeck
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -60,11 +60,11 @@ def test_echeckCredit_withecheck
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
}
- response= LitleOnlineRequest.new.echeckCredit(hash)
+ response= LitleOnlineRequest.new.echeck_credit(hash)
assert_equal('Valid Format', response.message)
end
- def test_echeckCredit_withechecktoken
+ def test_echeck_credit_with_echeck_token
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -76,11 +76,11 @@ def test_echeckCredit_withechecktoken
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'},
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
}
- response= LitleOnlineRequest.new.echeckCredit(hash)
+ response= LitleOnlineRequest.new.echeck_credit(hash)
assert_equal('Valid Format', response.message)
end
- def test_extrafieldand_incorrectOrder
+ def test_extra_field_and_incorrect_order
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -93,11 +93,11 @@ def test_extrafieldand_incorrectOrder
'orderSource'=>'ecommerce',
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
}
- response= LitleOnlineRequest.new.echeckCredit(hash)
+ response= LitleOnlineRequest.new.echeck_credit(hash)
assert_equal('Valid Format', response.message)
end
- def test_extrafieldand_missingBilling
+ def test_extra_field_and_missing_billing
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -109,7 +109,7 @@ def test_extrafieldand_missingBilling
'orderId'=>'12345',
'orderSource'=>'ecommerce',
}
- response= LitleOnlineRequest.new.echeckCredit(hash)
+ response= LitleOnlineRequest.new.echeck_credit(hash)
assert(response.message =~ /Error validating xml data against the schema/)
end
end
@@ -26,42 +26,42 @@
require 'test/unit'
class Test_echeckRedeposit < Test::Unit::TestCase
- def test_simple_echeckRedeposit
+ def test_simple_echeck_redeposit
hash = {
'merchantId' => '101',
'version'=>'8.8',
'reportGroup'=>'Planets',
'litleTxnId'=>'123456'
}
- response= LitleOnlineRequest.new.echeckRedeposit(hash)
+ response= LitleOnlineRequest.new.echeck_redeposit(hash)
assert_equal('Valid Format', response.message)
end
- def test_echeckRedeposit_withecheck
+ def test_echeck_redeposit_with_echeck
hash = {
'merchantId' => '101',
'version'=>'8.8',
'reportGroup'=>'Planets',
'litleTxnId'=>'123456',
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'}
}
- response= LitleOnlineRequest.new.echeckRedeposit(hash)
+ response= LitleOnlineRequest.new.echeck_redeposit(hash)
assert_equal('Valid Format', response.message)
end
- def test_echeckRedeposit_withecheckToken
+ def test_echeck_redeposit_with_echeck_token
hash = {
'merchantId' => '101',
'version'=>'8.8',
'reportGroup'=>'Planets',
'litleTxnId'=>'123456',
'echeckToken' => {'accType'=>'Checking','litleToken'=>'1234565789012','routingNum'=>'123456789','checkNum'=>'123455'}
}
- response= LitleOnlineRequest.new.echeckRedeposit(hash)
+ response= LitleOnlineRequest.new.echeck_redeposit(hash)
assert_equal('Valid Format', response.message)
end
- def test_extrafieldand_incorrectOrder
+ def test_extra_field_and_incorrect_order
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -70,7 +70,7 @@ def test_extrafieldand_incorrectOrder
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
'litleTxnId'=>'123456'
}
- response= LitleOnlineRequest.new.echeckRedeposit(hash)
+ response= LitleOnlineRequest.new.echeck_redeposit(hash)
assert_equal('Valid Format', response.message)
end
@@ -26,7 +26,7 @@
require 'test/unit'
class Test_echeckSale < Test::Unit::TestCase
- def test_echeckSalewithecheck
+ def test_echeck_sale_with_echeck
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -38,21 +38,21 @@ def test_echeckSalewithecheck
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
}
- response= LitleOnlineRequest.new.echeckSale(hash)
+ response= LitleOnlineRequest.new.echeck_sale(hash)
assert_equal('Valid Format', response.message)
end
- def test_noamount
+ def test_no_amount
hash = {
'merchantId' => '101',
'version'=>'8.8',
'reportGroup'=>'Planets'
}
- response = LitleOnlineRequest.new.echeckSale(hash)
+ response = LitleOnlineRequest.new.echeck_sale(hash)
assert_match /The content of element 'echeckSale' is not complete/, response.message
end
- def test_echeckSalewithecheck
+ def test_echeck_sale_with_echeck
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -64,11 +64,11 @@ def test_echeckSalewithecheck
'echeck' => {'accType'=>'Checking','accNum'=>'12345657890','routingNum'=>'123456789','checkNum'=>'123455'},
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
}
- response= LitleOnlineRequest.new.echeckSale(hash)
+ response= LitleOnlineRequest.new.echeck_sale(hash)
assert_equal('Valid Format', response.message)
end
- def test_echeckSalewith_shipto
+ def test_echeck_sale_with_ship_to
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -81,11 +81,11 @@ def test_echeckSalewith_shipto
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'},
'shipToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
}
- response= LitleOnlineRequest.new.echeckSale(hash)
+ response= LitleOnlineRequest.new.echeck_sale(hash)
assert_equal('Valid Format', response.message)
end
- def test_echeckSale_withechecktoken
+ def test_echeck_sale_with_echeck_token
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -98,11 +98,11 @@ def test_echeckSale_withechecktoken
'customBilling'=>{'phone'=>'123456789','descriptor'=>'good'},
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
}
- response= LitleOnlineRequest.new.echeckSale(hash)
+ response= LitleOnlineRequest.new.echeck_sale(hash)
assert_equal('Valid Format', response.message)
end
- def test_extrafieldand_incorrectOrder
+ def test_extra_field_and_incorrect_order
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -115,11 +115,11 @@ def test_extrafieldand_incorrectOrder
'orderSource'=>'ecommerce',
'billToAddress'=>{'name'=>'Bob','city'=>'lowell','state'=>'MA','email'=>'litle.com'}
}
- response= LitleOnlineRequest.new.echeckSale(hash)
+ response= LitleOnlineRequest.new.echeck_sale(hash)
assert_equal('Valid Format', response.message)
end
- def test_extrafieldand_missingBilling
+ def test_extra_field_and_missing_billing
hash = {
'merchantId' => '101',
'version'=>'8.8',
@@ -131,27 +131,29 @@ def test_extrafieldand_missingBilling
'orderId'=>'12345',
'orderSource'=>'ecommerce',
}
- response= LitleOnlineRequest.new.echeckSale(hash)
+ response= LitleOnlineRequest.new.echeck_sale(hash)
assert(response.message =~ /Error validating xml data against the schema/)
end
- # def test_simple_echecksale
- # hash = {
- # 'reportGroup'=>'Planets',
- # 'litleTxnId'=>'123456789101112',
- # 'amount'=>'12'
- # }
- # response= LitleOnlineRequest.new.echeckSale(hash)
- # assert_equal('Valid Format', response.message)
- # end
- # def test_simple_echeckSalewithCustombilling
- # hash = {
- # 'reportGroup'=>'Planets',
- # 'litleTxnId'=>'123456',
- # 'amount'=>'10',
- # }
- # response= LitleOnlineRequest.new.echeckSale(hash)
- # assert_equal('Valid Format', response.message)
- # end
+
+ def test_simple_echecksale
+ hash = {
+ 'reportGroup'=>'Planets',
+ 'litleTxnId'=>'123456789101112',
+ 'amount'=>'12'
+ }
+ response= LitleOnlineRequest.new.echeck_sale(hash)
+ assert_equal('Valid Format', response.message)
+ end
+
+ def test_simple_echeck_sale_with_custom_billing
+ hash = {
+ 'reportGroup'=>'Planets',
+ 'litleTxnId'=>'123456',
+ 'amount'=>'10',
+ }
+ response= LitleOnlineRequest.new.echeck_sale(hash)
+ assert_equal('Valid Format', response.message)
+ end
end

0 comments on commit c58c404

Please sign in to comment.