API de comptabilité horaire.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Batch.pm 797B

123456789101112131415161718192021222324252627282930313233343536
  1. use NRT::Test;# qw( rq assertEqual);
  2. use NRT::Helper;
  3. #require NRT::Test ;
  4. #require NRT::Helper;
  5. package Batch;
  6. sub new {
  7. my ($classe, %config) = @_;
  8. my $this = {};
  9. $classe = ref($classe) || $classe;
  10. bless ( $this, $classe );
  11. $this->{tester} = Test->new( %config );
  12. return $this;
  13. }
  14. sub test_rq_empty {
  15. my $this = shift;
  16. my $rq = $this->{tester}->get_code();
  17. return $this->{tester}->assertEqual( $rq, "404 Not Found" );
  18. }
  19. sub run {
  20. my $this = shift;
  21. $this->test_rq_empty();
  22. $this->brief();
  23. }
  24. sub brief {
  25. my $this = shift;;
  26. print "\nResults :\n";
  27. Helper::printColor( "bright_green", "Tests succeed : ".$this->{tester}->{countSuccess}."\n" );
  28. Helper::printColor( "bright_red", "Tests failed : ".$this->{tester}->{countFailure}."\n" );
  29. }
  30. return 1;