Changeset 1430

Show
Ignore:
Timestamp:
04/02/08 22:00:03 (5 months ago)
Author:
kindlund
Message:

Updated unit tests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • honeyclient/branches/exp/kindlund-simpler_agent/lib/HoneyClient/Agent.pm

    r1429 r1430  
    542542use Config; 
    543543SKIP: { 
     544    # TODO: Update number! 
    544545    skip 'HoneyClient::Agent only works in Cygwin environment.', 5 if ($Config{osname} !~ /^cygwin$/); 
    545546 
     
    583584        # Check that os_processes is empty. 
    584585        ok(!scalar(@{$changes->{'fingerprint'}->{os_processes}}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
     586 
     587        diag("Driving HoneyClient::Agent::Driver::Browser::IE with no parameters and artificial changes..."); 
     588 
     589        # Drive the Agent using IE. 
     590        $som = $stub->drive(driver_name => "HoneyClient::Agent::Driver::Browser::IE"); 
     591 
     592        # Verify changes. 
     593        $changes = $som->result(); 
     594 
     595# XXX: Remove this. 
     596use Data::Dumper; 
     597diag(Dumper($changes)); 
     598    
     599        # Check to see if the drive operation completed properly.  
     600        ok($changes, "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
     601        ok(exists($changes->{'status'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
     602        ok(exists($changes->{'driven_at'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
     603        ok(exists($changes->{'fingerprint'}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
     604 
     605        # Check that os_processes is empty. 
     606        ok(scalar(@{$changes->{'fingerprint'}->{os_processes}}), "drive(driver_name => 'HoneyClient::Agent::Driver::Browser::IE')") or diag("The drive() call failed."); 
    585607 
    586608        # Delete the mock realtime_changes_file.