Sha256: 0a78e8d1b6329fcd974f7a625e130bcaddcf1a333f4fa6d9334e8d8728dbef88

Contents?: true

Size: 919 Bytes

Versions: 13

Compression:

Stored size: 919 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.join(File.dirname(__FILE__), '..', '..', '..','..','..','..'))

require 'rex/post/meterpreter/extensions/stdapi/railgun/api_constants'
require 'rex/post/meterpreter/extensions/stdapi/railgun/win_const_manager'
require 'rex/text'
require 'test/unit'

module Rex
module Post
module Meterpreter
module Extensions
module Stdapi
module Railgun
class ApiConstants::UnitTest < Test::Unit::TestCase
	def test_manager
		const_manager = ApiConstants.manager

		assert_equal(0, const_manager.parse('SUCCESS'),
			"ApiConstants.manager should return a functional constant manager for WinAPI constants")
	end

	def test_add_constants
		const_manager = WinConstManager.new

		ApiConstants.add_constants(const_manager)

		assert_equal(0, const_manager.parse('SUCCESS'),
			"ApiConstants.add_constants should have added WinAPI constants to given constant manager")
	end
end
end
end
end
end
end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.63 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.54 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.53 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.52 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.51 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.50 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.49 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.48 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.47 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.46 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.44 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb
librex-0.0.43 lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb