Permalink
Browse files

making it an eclipse project that can run the RUnit tests

  • Loading branch information...
1 parent 0c80be2 commit 92ee92829a330318395531a92a6cfbcf3e836322 mpclocal committed Aug 22, 2009
View
7 .loadpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<loadpath>
+ <pathentry path="" type="src"/>
+ <pathentry path="org.rubypeople.rdt.launching.RUBY_CONTAINER" type="con"/>
+ <pathentry path="GEM_LIB/soap4r-1.5.8/lib" type="var"/>
+ <pathentry path="GEM_LIB/ruby-openid-1.1.4/lib" type="var"/>
+</loadpath>
View
17 .project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>gitRsoapUI</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.rubypeople.rdt.core.rubybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.rubypeople.rdt.core.rubynature</nature>
+ </natures>
+</projectDescription>
View
2 test/fixtures/params/params_latest.yaml
@@ -25,7 +25,7 @@ action: Save
"@input.orderRequest.tenders.slice(0).creditCardType": ""
"@input.orderRequest.promotions.slice(0).receiptMessages.slice(0).locale": ""
file_name: params_latest.yaml
-client: /Users/sammyzahabi/Desktop/sinatra_on_gae/peyepr/generated_clients/discountService-V1-0
+client: "client_namespace"
"@input.orderRequest.orderLineItems.slice(0).product.itemCompanyNumber": ""
"@input.orderRequest.orderLineItems.slice(0).price.priceType": ""
"@input.orderRequest.promotions.slice(0).receiptMessages.slice(0).message": ""
View
20 test/unit/tc_loading_saving.rb
@@ -7,10 +7,10 @@
class TC_LoadingSaving < Test::Unit::TestCase
def setup
- @client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/latest_client"
- @test_client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/test_client"
+ @client_folder = Dir.pwd + "/test/fixtures/latest_client"
+ @test_client_folder = Dir.pwd + "/test/fixtures/test_client"
@namespace = "MySoap::InterfaceOne"
- @wsdl = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ @wsdl = Dir.pwd + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
@tool = Soap4r2Ruby.new(@client_folder, @namespace, @wsdl)
@tool.build_default_input_instance_for_method("applyDiscount")
@@ -32,7 +32,8 @@ def file_cleanup
end
def test_update_from_marshalled_yaml
@params = {}#YAML.load(File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/params.yaml"))
- @params['input'] = File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/input.yaml")
+ @params['input'] = File.open(Dir.pwd + "/test/fixtures/params/input.yaml")
+ @params['client'] = Dir.pwd + '/test/fixtures/client_namespace'
@result = nil
@result = SinatraAppHelpers::update(@params)
assert_not_nil(@result)
@@ -46,7 +47,8 @@ def test_update_from_marshalled_yaml
def test_update_from_marshalled_yaml_with_form_elements
@params = {}
- @params= YAML.load(File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/params_latest.yaml"))
+ @params= YAML.load(File.open(Dir.pwd + "/test/fixtures/params/params_latest.yaml"))
+ @params['client'] = Dir.pwd + '/test/fixtures/client_namespace'
@result = nil
@result = SinatraAppHelpers::update(@params)
assert_not_nil(@result)
@@ -60,7 +62,7 @@ def test_update_from_marshalled_yaml_with_form_elements
def test_save_request_to_yaml
#load a request example
- @input = YAML.load(File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/input.yaml"))
+ @input = YAML.load(File.open(Dir.pwd + "/test/fixtures/params/input.yaml"))
@input.orderRequest.promotions[0].discountReasonCode="something"
assert_not_nil @input
assert_equal(MySoap::InterfaceOne::DiscountServiceRequestType, @input.class)
@@ -74,7 +76,7 @@ def test_save_request_to_yaml
def test_load_request_from_yaml
#create the sample input
- @input = YAML.load(File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/input.yaml"))
+ @input = YAML.load(File.open(Dir.pwd + "/test/fixtures/params/input.yaml"))
@input.orderRequest.promotions[0].discountReasonCode="something"
assert_not_nil @input
assert_equal(MySoap::InterfaceOne::DiscountServiceRequestType, @input.class)
@@ -95,7 +97,7 @@ def test_load_request_from_yaml
def test_load_request_from_xml
#create the sample input
- myfile = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml"
+ myfile = Dir.pwd + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml"
@input = SaveLoadConvertHelpers::load_request_xml(myfile, @client_folder, @namespace, @wsdl)
assert_not_nil @input
assert_equal(MySoap::InterfaceOne::DiscountServiceRequestType, @input.class)
@@ -117,7 +119,7 @@ def test_load_request_from_xml
def test_save_request_as_xml
#load a request example
- xml = (File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml")).readlines.to_s
+ xml = (File.open(Dir.pwd + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml")).readlines.to_s
@input = SaveLoadConvertHelpers::xml2obj(@tool, xml)
assert_not_nil @input
assert_equal(MySoap::InterfaceOne::DiscountServiceRequestType, @input.class)
View
20 test/unit/tc_mpc1_service_names.rb
@@ -5,19 +5,19 @@
class TC_Mpc1ServiceNames < Test::Unit::TestCase
def setup
- @settlement = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/PromotionSettlementService.wsdl"
- @validation = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/PromoValidationService.wsdl"
- @usage = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/PromotionUsageService-V1-0.wsdl"
- @eligibility = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/EligibilityService.wsdl"
- @discount = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
- @google = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/GoogleSearch.wsdl"
+ @settlement = Dir.pwd + "/test/fixtures/sample_wsdls/PromotionSettlementService.wsdl"
+ @validation = Dir.pwd + "/test/fixtures/sample_wsdls/PromoValidationService.wsdl"
+ @usage = Dir.pwd + "/test/fixtures/sample_wsdls/PromotionUsageService-V1-0.wsdl"
+ @eligibility = Dir.pwd + "/test/fixtures/sample_wsdls/EligibilityService.wsdl"
+ @discount = Dir.pwd + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ @google = Dir.pwd + "/test/fixtures/sample_wsdls/GoogleSearch.wsdl"
- @old_discount = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/discountService-V1-0.wsdl"
- @lcm_inventory = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/IcmFindInventoryService-V1-0.wsdl"
- @find_inventory = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/FindInventoryServiceV1-0.wsdl"
+ @old_discount = Dir.pwd + "/test/fixtures/sample_wsdls/discountService-V1-0.wsdl"
+ @lcm_inventory = Dir.pwd + "/test/fixtures/sample_wsdls/IcmFindInventoryService-V1-0.wsdl"
+ @find_inventory = Dir.pwd + "/test/fixtures/sample_wsdls/FindInventoryServiceV1-0.wsdl"
- @test_client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/temp_test_client"
+ @test_client_folder = Dir.pwd + "/test/fixtures/temp_test_client"
@namespace = "MySoap::Interface"
end
View
8 test/unit/tc_namespace_issues.rb
@@ -5,10 +5,10 @@
class TC_NamespaceIssues < Test::Unit::TestCase
def setup
- @test_client_folder1 = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/temp_EncryptionService-V1-0"
- @test_client_folder2 = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/temp_latest_discountService-V1-0"
- @wsdl1 = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/EncryptionService-V1-0.wsdl"
- @wsdl2 = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ @test_client_folder1 = Dir.pwd+ "/test/fixtures/temp_EncryptionService-V1-0"
+ @test_client_folder2 = Dir.pwd+ "/test/fixtures/temp_latest_discountService-V1-0"
+ @wsdl1 = Dir.pwd+ "/test/fixtures/sample_wsdls/EncryptionService-V1-0.wsdl"
+ @wsdl2 = Dir.pwd+ "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
@namespace1 = "MySoap::Interface"
@namespace2 = "MySoap::Interface"
View
8 test/unit/tc_service_methods_and_names.rb
@@ -5,10 +5,10 @@
class TC_ServiceMethodsAndNames < Test::Unit::TestCase
def setup
- @test_client_folder1 = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/temp_EncryptionService-V1-0"
- @test_client_folder2 = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/temp_latest_discountService-V1-0"
- @wsdl1 = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/EncryptionService-V1-0.wsdl"
- @wsdl2 = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ @test_client_folder1 = Dir.pwd + "/test/fixtures/temp_EncryptionService-V1-0"
+ @test_client_folder2 = Dir.pwd + "/test/fixtures/temp_latest_discountService-V1-0"
+ @wsdl1 = Dir.pwd + "/test/fixtures/sample_wsdls/EncryptionService-V1-0.wsdl"
+ @wsdl2 = Dir.pwd + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
@namespace1 = "MySoap::Interface"
@namespace2 = "MySoap::Interface"
end
View
18 test/unit/tc_sinatra_app_helpers.rb
@@ -5,10 +5,10 @@
class TC_SinatraAppHelpers < Test::Unit::TestCase
def setup
- @client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/latest_client"
- @test_client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/test_client"
+ @client_folder = Dir.pwd + "/test/fixtures/latest_client"
+ @test_client_folder = Dir.pwd + "/test/fixtures/test_client"
@namespace = "MySoap::InterfaceOne"
- @wsdl = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ @wsdl = Dir.pwd + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
@tool = Soap4r2Ruby.new(@client_folder, @namespace, @wsdl)
@tool.build_default_input_instance_for_method("applyDiscount")
@@ -50,7 +50,7 @@ def test_minoccurs_maxoccurs_after_marshalling_unmarshalling
def test_create_new_element_on_add
- @input = YAML.load(File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/input.yaml"))
+ @input = YAML.load(File.open(Dir.pwd + "/test/fixtures/params/input.yaml"))
@input.orderRequest.promotions[0].discountReasonCode="something"
@action = "@input.orderRequest.promotions"
assert_equal("something", @input.orderRequest.promotions[0].discountReasonCode)
@@ -71,7 +71,7 @@ def test_create_new_element_on_add
end
def test_remove_element
- @input = YAML.load(File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/input.yaml"))
+ @input = YAML.load(File.open(Dir.pwd + "/test/fixtures/params/input.yaml"))
@input.orderRequest.promotions[0].discountReasonCode="something"
@action = "@input.orderRequest.promotions"
@result = SinatraAppHelpers::create_element(@input, @action)
@@ -107,7 +107,7 @@ def test_remove_element
end
def test_wsdl2ruby_generator
- wsdl = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ wsdl = Dir.pwd + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
driver_file = GeneratorHelpers::generate_ruby_classes(@test_client_folder, @namespace, wsdl)
assert_not_nil(driver_file)
# assert(driver_file.to_s =~ /default[0-9]+Driver.rb/)
@@ -117,7 +117,7 @@ def test_wsdl2ruby_generator
def test_convert_instance_to_xml
#load the object
- expected_xml = File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml").readlines.to_s
+ expected_xml = File.open(Dir.pwd + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml").readlines.to_s
expected_obj = SaveLoadConvertHelpers::xml2obj(@tool, expected_xml)
#test the object has what it needs
@@ -150,14 +150,14 @@ def test_convert_instance_to_xml
def test_convert_xml_to_instance
expected_result = ""
- xml = File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml").readlines.to_s
+ xml = File.open(Dir.pwd + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml").readlines.to_s
assert_equal(MySoap::InterfaceOne::DiscountServiceRequestType,@tool.default_instance.class)
result = SaveLoadConvertHelpers::xml2obj(@tool, xml)
assert_equal(MySoap::InterfaceOne::DiscountServiceRequestType, result.class)
end
def test_update_nil_enums
- @params = YAML.load(File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/params2.yaml"))
+ @params = YAML.load(File.open(Dir.pwd + "/test/fixtures/params/params2.yaml"))
@params = SinatraAppHelpers::update @params
@input = @params['input']
assert_not_nil(@input)
View
4 test/unit/tc_soap4r2ruby.rb
@@ -4,9 +4,9 @@
class TC_Soap4r2ruby < Test::Unit::TestCase
def setup
- @client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/latest_client"
+ @client_folder = Dir.pwd + "/test/fixtures/latest_client"
@namespace = "MySoap::InterfaceOne"
- @wsdl = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ @wsdl = Dir.pwd + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
end
View
6 test/unit/tc_soap4r2ruby_helpers.rb
@@ -4,9 +4,9 @@
class TC_Soap4r2rubyHelpers < Test::Unit::TestCase
def setup
- @client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/latest_client"
+ @client_folder = Dir.pwd + "/test/fixtures/latest_client"
@namespace = "MySoap::InterfaceOne"
- @wsdl = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ @wsdl = Dir.pwd + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
@tool = Soap4r2Ruby.new(@client_folder, @namespace, @wsdl)
@tool.build_default_input_instance_for_method("applyDiscount")
@@ -112,7 +112,7 @@ def test_min_max_tagging_with_schemadef
def test_min_max_tagger
schemadef = Soap4r2RubyHelpers::get_schemadef_for_type_name(eval(@namespace+'::DiscountServiceRequestType'), @tool.mapping_registry, @tool.literal_mapping_registry)
#load the object
- xml = File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml").readlines.to_s
+ xml = File.open(Dir.pwd + "/test/fixtures/sample_xmls/working_vdev_sample_request.xml").readlines.to_s
obj = SaveLoadConvertHelpers::xml2obj(@tool, xml)
assert_not_nil(obj)
assert_equal(MySoap::InterfaceOne::DiscountServiceRequestType, obj.class)
View
8 test/unit/tc_submission.rb
@@ -7,9 +7,9 @@ class TC_Submission < Test::Unit::TestCase
def setup
- @client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/client_namespace"
- @test_client_folder = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/test_client"
- @wsdl = File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
+ @client_folder = Dir.pwd + "/test/fixtures/client_namespace"
+ @test_client_folder = Dir.pwd + "/test/fixtures/test_client"
+ @wsdl = Dir.pwd + "/test/fixtures/sample_wsdls/latest_discountService-V1-0.wsdl"
@namespace = "MySoap::InterfaceOne"
@tool = Soap4r2Ruby.new(@client_folder, @namespace, @wsdl)
@@ -34,7 +34,7 @@ def file_cleanup
def test_send_request_default_endpoint
#create the sample input
@input = {}
- @input= YAML.load(File.open(File.dirname(File.expand_path(__FILE__)) + "/test/fixtures/params/input.yaml"))
+ @input= YAML.load(File.open(Dir.pwd + "/test/fixtures/params/input.yaml"))
endpoint = nil
service_method = "applyDiscount"
namespace = 'MySoap::InterfaceOne'

0 comments on commit 92ee928

Please sign in to comment.