::xox::test
Class TestEnvironment

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

Class TestEnvironment
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
assertTCLLIBPATHinAutoPath {}  
test {}  
testAddTclLibPath {}  
testXml {}  
   
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

assertTCLLIBPATHinAutoPath

Description:
 
Code:
  ::xox::test::TestEnvironment instproc assertTCLLIBPATHinAutoPath {}  {
   

        my debug $::env(TCLLIBPATH)

        my debug $::auto_path

        foreach path $::env(TCLLIBPATH) {

            my assertFindIn $path $::auto_path
        }
    
}

test

Description:
 
Code:
  ::xox::test::TestEnvironment instproc test {}  {
   

        set TCLLIBPATH $::env(TCLLIBPATH)

        my assertNotEquals $TCLLIBPATH ""


        my assertTCLLIBPATHinAutoPath

        lappend ::env(TCLLIBPATH) $::env(HOME)/XYZ
        lappend ::auto_path $::env(HOME)/XYZ

        my assertTCLLIBPATHinAutoPath
    
}

testAddTclLibPath

Description:
 
Code:
  ::xox::test::TestEnvironment instproc testAddTclLibPath {}  {
   

        set environment [ ::xox::Environment new ]

        $environment addTclLibPath $::env(HOME)/XYZ123

        my assertFindIn $::env(HOME)/XYZ123 $::env(TCLLIBPATH)
        my assertFindIn $::env(HOME)/XYZ123 $::auto_path
    
}

testXml

Description:
 
Code:
  ::xox::test::TestEnvironment instproc testXml {}  {
   

        set reader [ ::xox::XmlNodeReader new ]

        set environment [ ::xox::Environment new ]

        set xml  "<env>
<tclLibPath>
A456
B789
C123
DXYZ
</tclLibPath>
</env>"

        $reader buildNodes $environment $xml

        my assertListEquals [ $environment tclLibPath ] "A456 B789 C123 DXYZ"

        $environment loadPaths

        foreach path [ $environment tclLibPath ] {

            my assertFindIn $path $::env(TCLLIBPATH)
            my assertFindIn $path $::auto_path
        }

        my assertTCLLIBPATHinAutoPath
    
}