2005-02-18 05:35:25 -05:00
|
|
|
require File.dirname(__FILE__) + '/abstract_unit'
|
|
|
|
|
|
|
|
module BaseTest
|
2005-02-18 18:55:29 -05:00
|
|
|
class API < ActionWebService::API::Base
|
2005-02-18 05:35:25 -05:00
|
|
|
api_method :add, :expects => [:int, :int], :returns => [:int]
|
|
|
|
api_method :void
|
|
|
|
end
|
|
|
|
|
2005-02-18 18:55:29 -05:00
|
|
|
class PristineAPI < ActionWebService::API::Base
|
2005-02-18 05:35:25 -05:00
|
|
|
inflect_names false
|
|
|
|
|
|
|
|
api_method :add
|
|
|
|
api_method :under_score
|
|
|
|
end
|
|
|
|
|
2005-02-18 18:55:29 -05:00
|
|
|
class Service < ActionWebService::Base
|
2005-02-18 16:22:52 -05:00
|
|
|
web_service_api API
|
2005-02-18 05:35:25 -05:00
|
|
|
|
|
|
|
def add(a, b)
|
|
|
|
end
|
|
|
|
|
|
|
|
def void
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2005-02-18 18:55:29 -05:00
|
|
|
class PristineService < ActionWebService::Base
|
2005-02-18 16:22:52 -05:00
|
|
|
web_service_api PristineAPI
|
2005-02-18 05:35:25 -05:00
|
|
|
|
|
|
|
def add
|
|
|
|
end
|
|
|
|
|
|
|
|
def under_score
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class TC_Base < Test::Unit::TestCase
|
|
|
|
def test_options
|
2005-02-18 16:22:52 -05:00
|
|
|
assert(BaseTest::PristineService.web_service_api.inflect_names == false)
|
|
|
|
assert(BaseTest::Service.web_service_api.inflect_names == true)
|
2005-02-18 05:35:25 -05:00
|
|
|
end
|
|
|
|
end
|