Initial Import Rest on CMS.
This commit is contained in:
55
persistence/tests/application.e
Normal file
55
persistence/tests/application.e
Normal file
@@ -0,0 +1,55 @@
|
||||
note
|
||||
description : "tests application root class"
|
||||
date : "$Date: 2014-08-20 15:21:15 -0300 (mi., 20 ago. 2014) $"
|
||||
revision : "$Revision: 95678 $"
|
||||
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
inherit
|
||||
ARGUMENTS
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature {NONE} -- Initialization
|
||||
|
||||
make
|
||||
-- Run application.
|
||||
local
|
||||
user: USER_DATA_PROVIDER
|
||||
node: NODE_DATA_PROVIDER
|
||||
l_security: SECURITY_PROVIDER
|
||||
do
|
||||
create connection.login_with_schema ("cms", "root", "")
|
||||
-- create user.make (connection)
|
||||
---- user.new_user ("jv", "test","test@test.com")
|
||||
|
||||
-- if attached user.user (3) as l_user then
|
||||
-- if attached user.user_salt ("jv") as l_salt then
|
||||
-- create l_security
|
||||
-- if attached l_user.password as l_password then
|
||||
-- print (l_password)
|
||||
-- io.put_new_line
|
||||
-- print (l_security.password_hash ("test", l_salt))
|
||||
|
||||
-- check same_string: l_security.password_hash ("test", l_salt).is_case_insensitive_equal (l_password) end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
|
||||
-- if attached user.user_by_name ("jv") as l_user then
|
||||
-- check l_user.id = 3 end
|
||||
-- end
|
||||
|
||||
create node.make (connection)
|
||||
across node.recent_nodes (0, 5) as c loop
|
||||
print (c.item)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
connection: DATABASE_CONNECTION_MYSQL
|
||||
|
||||
end
|
||||
22
persistence/tests/tests.ecf
Normal file
22
persistence/tests/tests.ecf
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="tests">
|
||||
<target name="tests">
|
||||
<root class="APPLICATION" feature="make"/>
|
||||
<option warning="true" void_safety="conformance">
|
||||
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
|
||||
</option>
|
||||
<setting name="concurrency" value="thread"/>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||
<library name="crypto" location="$ISE_LIBRARY\unstable\library\text\encryption\crypto\crypto-safe.ecf"/>
|
||||
<library name="persitence" location="..\persistence.ecf" readonly="false"/>
|
||||
<library name="testing" location="$ISE_LIBRARY\library\testing\testing-safe.ecf"/>
|
||||
<library name="process" location="$ISE_LIBRARY\library\process\process-safe.ecf"/>
|
||||
<cluster name="tests" location=".\" recursive="true">
|
||||
<file_rule>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
<exclude>/CVS$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
</file_rule>
|
||||
</cluster>
|
||||
</target>
|
||||
</system>
|
||||
Reference in New Issue
Block a user