Added SQLite ODBC example under test/APPLICATION.e class.

Fixed compilation issues with SQLite implemenation. (need to be updated)
This commit is contained in:
jvelilla
2014-10-01 14:11:17 -03:00
parent 27a11f2eea
commit 52cc566e15
5 changed files with 65 additions and 9 deletions

View File

@@ -21,7 +21,8 @@ feature {NONE} -- Initialization
node: NODE_DATA_PROVIDER
l_security: SECURITY_PROVIDER
do
create connection.make_basic ("cms_dev")
-- Change the path.
create connection.login_with_connection_string ("Driver=SQLite3 ODBC Driver;Database=./cms_lite.db;LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;")
create user.make (connection)
user.new_user ("test", "test", "test")
end

Binary file not shown.

View File

@@ -231,7 +231,7 @@ feature -- Test routines
l_node.set_summary ("New Summary")
l_node.set_title("New Title")
storage.update_node (l_node)
-- storage.update_node (l_node)
assert ("Updated", attached {CMS_NODE} storage.node (1) as u_node and then not (u_node.title ~ ll_node.title) and then not (u_node.content ~ ll_node.content) and then not (u_node.summary ~ ll_node.summary))
end
end
@@ -243,7 +243,7 @@ feature -- Test routines
do
storage.save_node (custom_node ("Content", "Summary", "Title"))
if attached {CMS_NODE} storage.node (1) as ll_node then
storage.update_node_title (ll_node.id, "New Title")
-- storage.update_node_title (ll_node.id, "New Title")
assert ("Updated", attached {CMS_NODE} storage.node (1) as u_node and then not (u_node.title ~ ll_node.title) and then u_node.content ~ ll_node.content and then u_node.summary ~ ll_node.summary)
end
end
@@ -255,7 +255,7 @@ feature -- Test routines
do
storage.save_node (custom_node ("Content", "Summary", "Title"))
if attached {CMS_NODE} storage.node (1) as ll_node then
storage.update_node_summary (ll_node.id, "New Summary")
-- storage.update_node_summary (ll_node.id, "New Summary")
assert ("Updated", attached {CMS_NODE} storage.node (1) as u_node and then u_node.title ~ ll_node.title and then u_node.content ~ ll_node.content and then not (u_node.summary ~ ll_node.summary))
end
end
@@ -267,7 +267,7 @@ feature -- Test routines
do
storage.save_node (custom_node ("Content", "Summary", "Title"))
if attached {CMS_NODE} storage.node (1) as ll_node then
storage.update_node_content (ll_node.id, "New Content")
-- storage.update_node_content (ll_node.id, "New Content")
assert ("Updated", attached {CMS_NODE} storage.node (1) as u_node and then u_node.title ~ ll_node.title and then not (u_node.content ~ ll_node.content) and then u_node.summary ~ ll_node.summary)
end
end