Package org.rioproject.watch

Examples of org.rioproject.watch.Statistics.clearAll()


    public void testClearAll() {

        Statistics stat = new Statistics();

        for (int i = 0; i < 5; i++) {
            stat.clearAll();
            assertClean(stat);
        }

        List<Double> list = new ArrayList<Double>();
        list.add((double) 0);
View Full Code Here


        list.add((double) 2);
        stat.setValues(list);
        assertCorrect(list, stat);

        for (int i = 0; i < 5; i++) {
            stat.clearAll();
            assertClean(stat);
        }
    }

    /**
 
View Full Code Here

                double d = Math.random();
                stat.addValue(d);
                v.add(d);
            }
            assertCorrect(v, stat);
            stat.clearAll();
            assertCorrect(new Vector<Double>(), stat);
        }
    }

    /**
 
View Full Code Here

                double d = Math.random();
                stat.addValue(d);
                v.add(d);
            }
            Assert.assertEquals(v, stat.getValues());
            stat.clearAll();
            Assert.assertEquals(new Vector(), stat.getValues());
        }

        Vector<Double> v = new Vector<Double>();
        stat.setValues(v);
View Full Code Here

                Double d = Math.random();
                stat.addValue(d);
                v.add(d);
                assertCorrect(v, stat);
            }
            stat.clearAll();
        }

        try {
            stat.addValue(null);
            Assert.fail("IllegalArgumentException expected but not thrown");
View Full Code Here

                double d = Math.random();
                stat.addValue(d);
                v.add(d);
                assertCorrect(v, stat);
            }
            stat.clearAll();
        }
    }

    /**
     * Tests the <code>setValues</code> method.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.