Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Writing and testing method of addition of two numbers

This section starts with a simple example that will illustrate the basic concepts involved in testing with JUnit. In this section, we will be creating a java file named Calculator.java which has a method named sum() which takes two int parameters and retu

Tutorial Details:

This section starts with a simple example that will illustrate the basic concepts involved in testing with JUnit. In this section, we will be creating a java file named Calculator.java which has a method named sum() which takes two int parameters and return addition of these two numbers. So here we have to check whether this method is functioning well in all the conditions or not.


 

Rate Tutorial:
http://www.roseindia.net/junit/writingandtesting.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Writing and testing method of addition of two numbers

View Tutorial:
Writing and testing method of addition of two numbers

Related Tutorials:

Accelerate your Java apps! - JavaWorld - September 1998
Accelerate your Java apps! - JavaWorld - September 1998
 
Test infect your Enterprise JavaBeans - JavaWorld May 2000
Test infect your Enterprise JavaBeans - JavaWorld May 2000
 
Validation with Java and XML schema, Part 1 - JavaWorld September 2000
Validation with Java and XML schema, Part 1 - JavaWorld September 2000
 
Printing in Java, Part 4 - JavaWorld February 2001
Printing in Java, Part 4 - JavaWorld February 2001
 
Matchmaking with regular expressions - JavaWorld July 2001
Matchmaking with regular expressions - JavaWorld July 2001
 
Pattern your way to automated regression testing
Pattern your way to automated regression testing
 
Implement Design by Contract for Java using dynamic proxies
Implement Design by Contract for Java using dynamic proxies
 
Java scripting languages: Which is right for you?
Java scripting languages: Which is right for you?
 
Navigate data with the Mapper framework
Navigate data with the Mapper framework
 
Exceptions: Don't get thrown for a loss
Exceptions: Don't get thrown for a loss
 
Test networked code the easy way
Test networked code the easy way
 
Make a statement with javac!
Make a statement with javac!
 
Quite poor testing
Quite poor testing
 
Good, but obsolete
Good, but obsolete
 
Comparing The Performance of J2EE Servers
Performance ReportThe standardization of the application server, thanks to Sun\'s J2EE specifications, has spawned a wealth of implementations. There are offerings from big players such as Sun, IBM, BEA and Oracle as well as numerous offerings from low-co
 
Martin Fowler\'s usual terrific writing
The term 'Mock Objects' has become a popular one to describe special case objects that mimic real objects for testing. However the term mock was not originally meant as a more catchy name for stub, but to introduce a different approach to unit testing. In
 
JDemo: Interactive Testing Refactored
This article will introduce the JDemo framework and its techniques for writing code for interactive testing. It will also show the benefits that can be gained from writing demo code.
 
A well-behaved Jetspeed portlet
This article presents a working example of how to construct a Jetspeed portlet that runs efficiently, adheres to the Model 2 architecture, and, by not interfering with additional portlets, plays well with others. In addition, I demonstrate some simple way
 
What is the correct form of a MIDlet suite version number?
One character can be the difference between a successful installation and a failed attempt. Check your knowledge of MIDlet versioning.
 
developing a Session Bean and a Servlet and deploy the web application on JBoss 3.0
developing a Session Bean and a Servlet and deploy the web application on JBoss 3.0 Writing Calculator Session Bean and Calling through JSP Previous Tutorial Index Next In this lesson I will show you how to develop a Calculator Stateless Session
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.