test/file_persistence_test.rb in openwferu-0.9.11 vs test/file_persistence_test.rb in openwferu-0.9.12

- old
+ new

@@ -1,11 +1,9 @@ require 'test/unit' require 'openwfe/engine/engine' -#require 'openwfe/flowexpressionid' -#require 'openwfe/expressions/expressionmap' require 'openwfe/expool/expstorage' require 'openwfe/expool/yamlexpstorage' include OpenWFE @@ -14,10 +12,14 @@ def setup @engine = Engine.new end + def teardown + @engine.stop + end + def ac return @engine.application_context end # @@ -32,9 +34,24 @@ def test_flow_expression fei = new_fei() fes = YamlFileExpressionStorage.new("yaml", ac) fe = SequenceExpression.new(fei, nil, nil, nil, nil) test_persistence(fes,fe) + end + + def test_path_splitting + + fei = new_fei + fes = YamlFileExpressionStorage.new("yaml", ac) + class << fes + public :compute_file_path + end + path = fes.compute_file_path fei + a = fes.class.split_file_path path + + assert_equal a[0], fei.wfid + assert_equal a[1], fei.expression_id + assert_equal a[2], fei.expression_name end # # test UTF-8 data persistence def test_utf8_with_file