::xox::test
Class TestObjectGraph

Heritage:
::xotcl::Object
  |
  +--::xox::Node
        |
        +--::xounit::Test
              |
              +--::xounit::Assert
                    |
                    +--::xounit::TestCase
Tested Class:
::xox::ObjectGraph

Class TestObjectGraph
superclass ::xounit::TestCase,

Variables
NameDefault ValueClassComment
currentTestMethod    ::xounit::TestCase
 name of the currently running test method.
nodeName    ::xox::Node
 
result    ::xounit::TestCase
 the result for the current run.
 
Methods
NameComment
notestGetInstprocs {}  
notestGetInstprocsPattern {}  
notestGetInstprocsPattern2 {}  
testFindAllInstances {}  
testFindFirstComment {}  
testGetInstprocsPattern3 {}  
testHasSuperclass {}  
testInstanceOf {}  
   
Methods from ::xotcl::Object
#, ., ?, ?code, ?methods, ?object, abstract, copy, coverageFilter, defaultmethod, extractConfigureArg, filterappend, garbageCollect, get#, getClean#, hasclass, init, methodTag, mixinappend, move, profileFilter, self, setParameterDefaults, shell, tclcmd, traceFilter,
 
Instproc Detail

notestGetInstprocs

Description:
 
Code:
  ::xox::test::TestObjectGraph instproc notestGetInstprocs {}  {
   

        my assertEquals [ ::xox::ObjectGraph getInstprocs ::xotcl::Object ] [ lsort [ ::xotcl::Object info instprocs ] ]
    
}

notestGetInstprocsPattern

Description:
 
Code:
  ::xox::test::TestObjectGraph instproc notestGetInstprocsPattern {}  {
   

        my assertEquals [ ::xox::ObjectGraph getInstprocs ::xotcl::Object * ] [ lsort [ ::xotcl::Object info instprocs * ] ]
    
}

notestGetInstprocsPattern2

Description:
 
Code:
  ::xox::test::TestObjectGraph instproc notestGetInstprocsPattern2 {}  {
   

        my assertEquals [ ::xox::ObjectGraph getInstprocs ::xotcl::Object copy ] [ lsort [ ::xotcl::Object info instprocs copy ] ]
    
}

testFindAllInstances

Description:
 
Code:
  ::xox::test::TestObjectGraph instproc testFindAllInstances {}  {
   

        ::xotcl::Class ::xox::test::TestFindInstances

        lappend list [ ::xox::test::TestFindInstances new ]
        lappend list [ ::xox::test::TestFindInstances new ]
        lappend list [ ::xox::test::TestFindInstances new ]
        lappend list [ ::xox::test::TestFindInstances new ]
        lappend list [ ::xox::test::TestFindInstances new ]
        lappend list [ ::xox::test::TestFindInstances new ]

        set instances [ ::xox::ObjectGraph findAllInstances ::xox::test::TestFindInstances ]

        foreach instance $list {

            my assertObjectInList $instances $instance
        }
    
}

testFindFirstComment

Description:
 
Code:
  ::xox::test::TestObjectGraph instproc testFindFirstComment {}  {
   

        set o [ Object new ]

        set comment [ ::xox::ObjectGraph findFirstComment $o . ]
        my assertNotEquals $comment ""
    
}

testGetInstprocsPattern3

Description:
 
Code:
  ::xox::test::TestObjectGraph instproc testGetInstprocsPattern3 {}  {
   

        my assertEquals [ ::xox::ObjectGraph getInstprocs ::xotcl::Object i* ] [ lsort [ ::xotcl::Object info instprocs i* ] ]
    
}

testHasSuperclass

Description:
 
Code:
  ::xox::test::TestObjectGraph instproc testHasSuperclass {}  {
   

        my assert [ ::xox::ObjectGraph hasSuperclass ::xotcl::Class ::xotcl::Object ]
        my assert [ ::xox::ObjectGraph hasSuperclass ::xox::Node ::xotcl::Object ]
        my assert [ ::xox::ObjectGraph hasSuperclass ::xounit::TestCase ::xotcl::Object ]
        my assert [ ::xox::ObjectGraph hasSuperclass ::xounit::TestCase ::xounit::Test ]
    
}

testInstanceOf

Description:
 
Code:
  ::xox::test::TestObjectGraph instproc testInstanceOf {}  {
   

        my assertFalse [ ::xox::ObjectGraph instanceof notAObject ::xotcl::Object ] 1
        my assert [ ::xox::ObjectGraph instanceof [ Object new ] ::xotcl::Object ] 2
        my assert [ ::xox::ObjectGraph instanceof [ self ] ::xotcl::Object ] 3
        my assert [ ::xox::ObjectGraph instanceof [ self ] ::xounit::TestCase ] 4
        my assert [ ::xox::ObjectGraph instanceof [ self ] ::xox::test::TestObjectGraph ] 5
    
}