diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-22 14:55:36 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-22 14:55:36 +0000 |
commit | bd729758a268240088b4abb64589441e39b7aec1 (patch) | |
tree | 20e526e585b9676949cfd75a713879051c9bffa2 /t/test-factory.rb | |
parent | c852ddbe52cdfc962dbb3d9e6ef4517d59961503 (diff) |
Added test-cases for ftp:wq
Diffstat (limited to 't/test-factory.rb')
-rwxr-xr-x | t/test-factory.rb | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/t/test-factory.rb b/t/test-factory.rb new file mode 100755 index 0000000..4a941b2 --- /dev/null +++ b/t/test-factory.rb @@ -0,0 +1,54 @@ +#!/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" ) + + + end + + +end + |