Posts by Olga:
EasyMock
Mock Objects
EasyMock
EasyMock 3.0
Sample Code:
MyClass mockObj = EasyMock.createStrictMock(MyClass.class);
mockObj.myMethod1(); EasyMock.expectLastCall();
mockObj.myMethod2(); EasyMock.expectLastCall().andReturn(true); EasyMock.expect(mockObj.myMethod3()).andReturn(true);
EasyMock.expect(mockObj.myMethod5(EasyMock.isA(MyParameter.class), EasyMock.eq(1))).andReturn(2);
Capture<MyParameter> captureObj = new Capture<MyParameter>();
mockObj.myMethod5(EasyMock.capture(captureObj), EasyMock.eq(1)); EasyMock.expectLastCall();
EasyMock.replay(mockObj);
EasyMock.verify(MockObj);
assertTrue("MyParameter captured", captureObj.hasCaptured());
MyParameter param = (MyParameter) captureObj.getValue()
References
DBUnit
When testing code that access and modify the database, you’ll need to insert the initial data into the database, execute your code, and check if the data in the database is exactly what you expected after executing your code. To automate this kind of testing you’ll need any kind of tool that can do all [...]
Maven
Apache Maven is a software project management tool that provides a standard way to build the project. It bases on project object model (POM) to describe how the project is build, order and dependencies with other modules. It also specify some development guidelines as keeping your testing and source code in a separate structure. Maven [...]
JUnit
JUnit is a simple, open source framework to write and run repeatable tests. Installing JUnit 1. Download the latest version of JUnit, from junit.org. 2. Then install JUnit on your platform: Windows 1.Unzip the junit.zip distribution file to a directory referred to as %JUNIT_HOME%. 2. Add JUnit to the classpath: set CLASSPATH=%CLASSPATH%;%JUNIT_HOME%\junit.jar Unix (bash) 1.Unzip [...]
Unit testing
Real stupidity beats artificial intelligence every time. Terry Pratchett. Testing your application cannot be reduced to test that your application normal use would work, you have to test that every piece of code works at it should. Unit testing consist on identifying and consistently verifying each software unit, checking inputs, state and outputs of an [...]
Oracle Identity Manager: Provisioning to a Database Table
Provisioning a User to a Database Table More information in the Provisioning a User to a Database Table tutorial. Create or configure the database table 1.Creating the table You can work with a already configured table or you can create your table of user data as follows: CREATE TABLE “XLADM”.”USER_DATA” ( “USER_ID” VARCHAR2(20 BYTE) NOT [...]
Oracle Identity Manager – Flat File Reconciliation
Performing Flat-File Reconciliation. This guide uses the following tutorial. Create the flat file. 1. Shut down Oracle Identity Manager Server Administrative and User Console Design Console. 2. Create the flat file. Within the stage dir /GTC/External Files directory, create the flat file and call it . Example: D:\Oracle\xellerate\GTC\External Files\users 20100101.txt #GTC Trusted Source login,firstName,lastName,eMail,organization USERTEST,usu_name,usu_lastname,usutest@example.com,Xellerate [...]
HTC Tattoo: Other Applications
TasKiller The HTC Tattoo has a problem, open applications never close or have an option to get close. That’s no so bad because it makes the applications to show the last state you left, this way, the browser will be open in the last page you visited. But you’ll eventually want to close applications, to [...]
HTC Tattoo
Due to the recent lost of my mobile, I decided to have a new one, a better one. The HTC Tattoo is an Android based smartphone, smaller than the other HTC in the market, with a resistive touchscreen. The first thing you have to do is link your google account, it will be used for [...]
Sun Identity Manager: User Functions
Now I’ve explained the objects used within an identity enviroment, I am going to detail the functions related to the users. For more information about the users or accounts, you can read previous post. User Users and related accounts are shown on Identity Manager as an unique identity, that allows the user to be modified [...]