high, normal, and low conditional methods

git-svn-id: file:///home/svn/incoming/trunk@2880 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Matt Miller 2005-09-24 17:33:22 +00:00
parent b0a5af80c6
commit 23197c644b
2 changed files with 16 additions and 0 deletions

View File

@ -50,6 +50,18 @@ class Evasion
@level
end
def self.high?
(get_level == EVASION_HIGH)
end
def self.normal?
(get_level == EVASION_NORMAL)
end
def self.low?
(get_level == EVASION_LOW)
end
#
# Sets the evasion level for a given subsystem
#

View File

@ -17,6 +17,10 @@ class Rex::Evasion::UnitTest < Test::Unit::TestCase
Klass.set_level(EVASION_LOW)
assert_equal(EVASION_LOW, Klass.get_level)
assert_equal(false, Klass.high?)
assert_equal(false, Klass.normal?)
assert_equal(true, Klass.low?)
end
def test_subsys