_xotcl-core__xotcl_core_tutorial_1 (private)

 _xotcl-core__xotcl_core_tutorial_1

Defined in packages/xotcl-core/tcl/test/xotcl-core-db-tutorial-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_false aa_false (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) aa_true aa_true (public) _xotcl-core__xotcl_core_tutorial_1 _xotcl-core__xotcl_core_tutorial_1 _xotcl-core__xotcl_core_tutorial_1->aa_false _xotcl-core__xotcl_core_tutorial_1->aa_log _xotcl-core__xotcl_core_tutorial_1->aa_log_result _xotcl-core__xotcl_core_tutorial_1->aa_run_with_teardown _xotcl-core__xotcl_core_tutorial_1->aa_true

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{

  aa_run_with_teardown -rollback -test_code {
    #
    # 1) Create new ACS Objects, destroy it in memory,
    #    load it from the database, delete it in the database.
    #

    set o [::xo::db::Object new_persistent_object]
    aa_true "'$o' looks like a valid object name" [regexp {^::\d+$} $o]

    set id [$o object_id]
    aa_true "'$o' has a matching object_id" [regexp "^::$id\$" $o]
    aa_true "$o is an abject" [nsf::is object $o]

    $o destroy
    aa_false "$o is not an abject anymore" [nsf::is object $o]

    # Load the persisted object from the DB
    set o [::xo::db::Class get_instance_from_db -id $id]
    aa_true "$o is again an abject" [nsf::is object $o]

    # Check, of object exists in the DB
    aa_true "$o exists in the DB" [::xo::db::Class exists_in_db -id $id]

    # Delete the object in the DB
    $o delete
    aa_false "$o does not exist in the DB anymore" [::xo::db::Class exists_in_db -id $id]
  }
}} {
          aa_log "Running testcase body $body_count"
          set ::__aa_test_indent [info level]
          set catch_val [catch $testcase_body msg]
          if {$catch_val != 0 && $catch_val != 2} {
              aa_log_result "fail" "xotcl_core_tutorial_1 (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: