Fixed various assertions.

Improved autotests
Added target 'server' to be able to run the server outside the test process.
This commit is contained in:
Jocelyn Fiat
2012-12-19 00:10:31 +01:00
parent ffe87ccbe9
commit 17f16c35ad
7 changed files with 302 additions and 122 deletions

View File

@@ -0,0 +1,59 @@
class
TEST
inherit
WSF_DEFAULT_SERVICE
TEST_SERVICE
create
make
feature {NONE} -- Initialization
make
-- Initialize `Current'.
do
print ("Test Server that could be used for autotest%N")
-- base_url := "/test/"
set_service_option ("port", 9091)
set_service_option ("verbose", True)
make_and_launch
end
feature -- Helper
server_log_path: STRING
local
fn: FILE_NAME
once
create fn.make_from_string ("server_test.log")
Result := fn.string
end
server_log (m: STRING_8)
local
f: RAW_FILE
do
create f.make (server_log_path)
f.open_append
f.put_string (m)
f.put_character ('%N')
f.close
end
base_url: detachable STRING
test_url (a_query_url: READABLE_STRING_8): READABLE_STRING_8
local
b: like base_url
do
b := base_url
if b = Void then
b := ""
end
Result := "/" + b + a_query_url
end
end