test/file_persistence_test.rb in openwferu-0.9.2 vs test/file_persistence_test.rb in openwferu-0.9.3

- old
+ new

@@ -49,41 +49,47 @@ protected def test_persistence (fes, fe=nil) + fei = new_fei() - fes.remove(fei,nil) if(fes.has_key?(fei)) + fes.delete(fei) if (fes.has_key?(fei)) raw = if fe == nil - RawExpression.new(fei, 'parent', 'env', nil, nil) + RawExpression.new(fei, 'parent', 'env', nil, nil) else - fe + fe end - assert (not fes.has_key?(fei)), "they key is present in the file system. Maybe a previous test did not delete the " + + assert \ + (not fes.has_key?(fei)), + "they key is present in the file system. "+ + "Maybe a previous test did not delete the " fes[fei]=raw assert fes.has_key?(fei) loaded = fes[fei] - fes.remove(fei,nil) + fes.delete(fei) assert !(fes.has_key?(fei)) return loaded end def new_fei (definition_name = nil) + fei = OpenWFE::FlowExpressionId.new() fei.owfe_version = OPENWFE_VERSION fei.engine_id = 'this' fei.initial_engine_id = 'that' fei.workflow_definition_url = 'http://test/test.xml' fei.workflow_definition_name = if definition_name == nil - 'test' - else - definition_name - end + 'test' + else + definition_name + end fei.workflow_definition_revision = '1.0' fei.workflow_instance_id = '1234568' fei.expression_name = 'do-test' fei.expression_id = '0.0' return fei