summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/test-custodian-alertfactory.rb19
-rwxr-xr-xt/test-custodian-testfactory.rb17
2 files changed, 36 insertions, 0 deletions
diff --git a/t/test-custodian-alertfactory.rb b/t/test-custodian-alertfactory.rb
index ede6aa7..4f2fb8d 100755
--- a/t/test-custodian-alertfactory.rb
+++ b/t/test-custodian-alertfactory.rb
@@ -51,6 +51,25 @@ class TestAlertFactory < Test::Unit::TestCase
assert( obj.respond_to? "raise" )
assert( obj.respond_to? "clear" )
end
+
+
+ #
+ # Creating an alert we don't know about is an error
+ #
+ assert_raise ArgumentError do
+ obj = Custodian::AlertFactory.create( "not found", nil )
+ end
+
+ #
+ # A string is mandatory
+ #
+ assert_raise ArgumentError do
+ obj = Custodian::AlertFactory.create( nil, nil )
+ end
+ assert_raise ArgumentError do
+ obj = Custodian::AlertFactory.create( Array.new, nil )
+ end
+
end
end
diff --git a/t/test-custodian-testfactory.rb b/t/test-custodian-testfactory.rb
index 65abc5b..b210ef9 100755
--- a/t/test-custodian-testfactory.rb
+++ b/t/test-custodian-testfactory.rb
@@ -23,6 +23,23 @@ class TestTestFactory < Test::Unit::TestCase
#
+ # Test bogus creation
+ #
+ def test_init
+
+ assert_raise ArgumentError do
+ obj = Custodian::TestFactory.create( nil, nil )
+ end
+
+ assert_raise ArgumentError do
+ obj = Custodian::TestFactory.create( Array.new, nil )
+ end
+
+
+ end
+
+
+ #
# Test the FTP-test may be created
#
def test_ftp_uri