Sha256: ffaa0b6cb9d2f3efbbc65e68d268ca98a45b8bd937c14f7a6cd7c63fa1c4ed31

Contents?: true

Size: 683 Bytes

Versions: 66

Compression:

Stored size: 683 Bytes

Contents

$: << File.join("..","lib")
require "test/unit"
require "log4r"
include Log4r

class TestNDC < Test::Unit::TestCase

  def test_ndc_remove_push
    NDC.remove()
    NDC.push("ndc")
    assert(Log4r::NDC.get() == "ndc", "Expected 'ndc' got '#{NDC.get()}'" )
    NDC.push("ndc")
    assert(Log4r::NDC.get() == "ndc ndc", "Expected 'ndc ndc' got '#{NDC.get()}'" )
  end

  def test_ndc_remove_push_clone_and_inherit
    NDC.remove()
    NDC.push("ndc")
    NDC.push("ndc")
    a = NDC.clone_stack()
    NDC.remove()
    assert(NDC.get() == "", "Expected '' got '#{NDC.get()}'" )
    NDC.inherit(a)
    assert(NDC.get() == "ndc ndc", "Expected 'ndc ndc' got '#{NDC.get()}'" )
  end

end

Version data entries

66 entries across 36 versions & 4 rubygems

Version Path
depengine-0.0.31 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.31 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.26 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.25 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.25 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.24 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.24 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.23 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.23 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.22 etc/isolate/jruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb
depengine-0.0.22 etc/isolate/ruby-1.8/gems/log4r-1.1.8/tests/testNDC.rb