summaryrefslogtreecommitdiff
path: root/t/test-custodian-testfactory.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-23 13:52:20 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-23 13:52:20 +0000
commitb6a842c084c2f390fbb833ea55494039234fa5eb (patch)
tree0a044e75c43adbf73f36a7378222b47bfa596cd9 /t/test-custodian-testfactory.rb
parent6729903cf5ce2955c164dc0f9cc541587554c962 (diff)
Renamed.
Diffstat (limited to 't/test-custodian-testfactory.rb')
-rwxr-xr-xt/test-custodian-testfactory.rb59
1 files changed, 59 insertions, 0 deletions
diff --git a/t/test-custodian-testfactory.rb b/t/test-custodian-testfactory.rb
new file mode 100755
index 0000000..7ef44b1
--- /dev/null
+++ b/t/test-custodian-testfactory.rb
@@ -0,0 +1,59 @@
+#!/usr/bin/ruby -Ilib/ -I../lib/
+
+
+require 'test/unit'
+
+require 'custodian/protocoltest/tcp.rb'
+require 'custodian/protocoltest/dns.rb'
+require 'custodian/protocoltest/ftp.rb'
+require 'custodian/protocoltest/http.rb'
+require 'custodian/protocoltest/jabber.rb'
+require 'custodian/protocoltest/ldap.rb'
+require 'custodian/protocoltest/ping.rb'
+require 'custodian/protocoltest/rsync.rb'
+require 'custodian/protocoltest/ssh.rb'
+require 'custodian/protocoltest/smtp.rb'
+
+
+
+class TestTestFactory < Test::Unit::TestCase
+
+ #
+ # Create the test suite environment: NOP.
+ #
+ def setup
+ end
+
+ #
+ # Destroy the test suite environment: NOP.
+ #
+ def teardown
+ end
+
+
+ #
+ # Test the FTP-test may be created
+ #
+ def test_ftp_uri
+ assert_nothing_raised do
+ assert( Custodian::TestFactory.create( "ftp.example.com must run ftp." ) )
+ assert( Custodian::TestFactory.create( "ftp://ftp.example.com/ must run ftp." ) )
+ assert( Custodian::TestFactory.create( "ftp://ftp.example.com/ must run ftp on 21." ) )
+ assert( Custodian::TestFactory.create( "ftp://ftp.example.com/ must run ftp on 21 otherwise 'xxx'." ) )
+ end
+
+
+ assert( Custodian::TestFactory.create( "ftp.example.com must run ftp." ).target() == "ftp.example.com" )
+ assert( Custodian::TestFactory.create( "ftp://ftp.example.com/ must run ftp." ).target() == "ftp.example.com" )
+
+
+
+ assert( Custodian::TestFactory.create( "rsync.example.com must run rsync." ).target() == "rsync.example.com" )
+ assert( Custodian::TestFactory.create( "rsync://rsync.example.com/ must run rsync." ).target() == "rsync.example.com" )
+
+
+ end
+
+
+end
+