Sha256: fcf1947eb74b4fb130e7866ddf63048367a0bca0894a90ce0469e13e5818dbba

Contents?: true

Size: 631 Bytes

Versions: 61

Compression:

Stored size: 631 Bytes

Contents

require 'test_helper'

class TestNDC < TestCase
  include Log4r

  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

61 entries across 53 versions & 12 rubygems

Version Path
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/gems/log4r-1.1.10/tests/testNDC.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/gems/log4r-1.1.10/tests/testNDC.rb