136 CHAPTER 5 PERFORMANCE THROUGH THE APPLICATION (Apache web server tutorial)

136 CHAPTER 5 PERFORMANCE THROUGH THE APPLICATION DEVELOPMENT LIFE CYCLE /** * Clean up: do nothing for now */ protected void tearDown() { } /** * Test the range of the DataPoint */ public void testRange() { assertEquals( 9.0, dp.getRange(), 0.001 ); } /** * See if the DataPoint scales properly */ public void testScale() { dp.scale( 10.0 ); assertEquals( 50.0, dp.getValue(), 0.001 ); assertEquals( 10.0, dp.getMin(), 0.001 ); assertEquals( 100.0, dp.getMax(), 0.001 ); } /** * Try to add a new DataPoint to our existing one */ public void testAdd() { DataPoint other = new DataPoint( new Date(), 4.0, 0.5, 20.0 ); dp.add( other ); assertEquals( 9.0, dp.getValue(), 0.001 ); assertEquals( 0.5, dp.getMin(), 0.001 ); assertEquals( 20.0, dp.getMax(), 0.001 ); } /** * Test the compare functionality of our DataPoint to ensure that * when we construct Sets of DataPoints they are properly ordered */ public void testCompareTo() { try {
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision web design programs services

Leave a Reply