Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.229.421 Times

Test::MockClass 1.04

  Date Added: January 27, 2010  |  Visits: 673

Test::MockClass

Report Broken Link
Printer Friendly Version


Product Homepage
Download (106 downloads)



Test::MockClass is a Perl module to provide mock classes and mock objects for testing. SYNOPSIS # Pass in the class name and version that you want to mock use Test::MockClass qw{ClassToMock 1.1}; # create a MockClass object to handle a specific class my $mockClass = Test::MockClass->new(ClassToMock); # specify to inherit from a real class, or a mocked class: $mockClass->inheritFrom(IO::Socket); # make a constructor for the class, can also use addMethod for more control $mockClass->defaultConstructor(%classWideDefaults); # add a method: $mockClass->addMethod(methodname, $coderef); # add a simpler method, and specify return values that it will return automatically $mockClass->setReturnValues(methodname2, always, 3); # create an instance of the mocked class: my $mockObject = $mockClass->create(%instanceData); # set the desired call order for the methods: $mockClass->setCallOrder(methodname2, methodname, methodname); # run tests using the mock Class elsewhere: #:in the class to test: sub objectFactory { return ClassToMock->new; } #:in your test code: assert($testObj->objectFactory->isa("ClassToMock")); # get the object Id for the rest of the methods: my $objectId = "$mockObject"; #or $objectId = $mockClass->getNextObjectId(); # verify that the methods were called in the correct order: if($mockClass->verifyCallOrder($objectId)) { # do something } # get the order that the methods were called: my @calls = $mockClass->getCallOrder($objectId); # get the list of arguments passed per call: my @argList = $mockClass->getArgumentList($objectId, methodname, $callPosition); # get the list of accesses made to a particular attribute (hashkey in $mockObject) my @accesses = $mockClass->getAttributeAccess($objectId, attribute);.

Requirements: No special requirements
Platforms: Linux
Keyword: Class Classtomock Libraries Mock Mock Objects Mockclass Module Objects Perl Perl Module Programming Provide Testmockclass
Users rating: 0/10

License: Freeware Size: 14.34 KB
USER REVIEWS
More Reviews or Write Review


TEST::MOCKCLASS RELATED
Programming  -  Mock Objects for C++ 1.16.1
mockpp is a platform independent generic unit testing framework for C++. Mock Objects for C++ goal is to facilitate developing unit tests in the spirit of Mock Objects for Java, EasyMock and jMock. Mock objects allow you to set up predictible...
696.32 KB  
Libraries  -  Regexp::Common::net 2.120
Regexp::Common::net is a Perl module that provide regexes for IPv4 addresses. SYNOPSIS use Regexp::Common qw /net/; while ( ) { /$RE{net}{IPv4}/ and print "Dotted decimal IP address"; /$RE{net}{IPv4}{hex}/ and print "Dotted hexadecimal IP...
112.64 KB  
Libraries  -  Getopt::Function 0.017
Getopt::Function is a Perl module to provide mixed options with help information. SYNOPSIS use Getopt::Function qw(maketrue makevalue); $::opthandler = new Getopt::Function [ ], { => [ , , ] } $result = GetOptions...
13.31 KB  
Modules  -  Flowplayer API 7.x-1.0-alpha1
An API module to provide integration with the GPL licensed Flowplayer for Flash video playback.Features * Easily adds Flowplayer support to other systems * Takes advantage of Drupal javascript Behaviors * Applying any configuration option is...
174.08 KB  
Programming  -  Pascal Mock 1.1
Pascal Mock provides a mock library for Delphi/Kylix/FreePascal. Delphi/Kylix/FreePascal were lacking a mock library. The Pascal Mock library enables the easy creation and use of Mock objects for unit testing, inspired by the various Java mock...
419.84 KB  
Libraries  -  Games::Object 0.11
Games::Object is a Perl module to provide a base class for game objects. SYNOPSIS package MyGameObject; use Games::Object; use vars qw(@ISA); @ISA = qw(Games::Object); sub new { # Create object my $proto = shift; my $class =...
84.99 KB  
Security Tools  -  OpenSC 0.11.3
OpenSC consists of tools and libraries and a PKCS#11 module to use smart cards and initialize blank smart cards. OpenSC project supports many commercial smart cards with filesystems, many national ID cards (read only), and some Java Card cards...
1.2 MB  
Database Tools  -  ORM mapping class 1.0
This PHP script is designed to act as a base class for storing and retrieving objects in MySQL databases. This base class should be extended by other class to define the MySQL database table and the fields to store and retrieve the object...
10 KB  
Libraries  -  Volity::Jabber 0.6.5
Volity::Jabber is a base class for Jabber-speaking Volity objects. SYNOPSIS package My::Volity::Object; use base qw(Volity::Jabber); use fields qw(wubba_wubba); # Override the parents initialize method to set values on construction. sub...
102.4 KB  
Programming  -  SimpleTest 1.1.0
Unit testing, mock objects and web testing framework for PHP built around test cases. If you know JUnit/JMock or some of the PHPUnit clones this will need no explanation. Includes a native web browser for testing web sites directly (no JavaScript).
280.8 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB