KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > test > internal > performance > tests > PerformanceMeterFactoryTest


1 /*******************************************************************************
2  * Copyright (c) 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.test.internal.performance.tests;
12
13 import org.eclipse.test.internal.performance.OSPerformanceMeter;
14 import org.eclipse.test.performance.Performance;
15 import org.eclipse.test.performance.PerformanceMeter;
16
17 import junit.framework.TestCase;
18
19 public class PerformanceMeterFactoryTest extends TestCase {
20
21     public void testPerformanceMeterFactory() {
22         System.setProperty("PerformanceMeterFactory", "org.eclipse.test.performance:org.eclipse.test.internal.performance.OSPerformanceMeterFactory"); //$NON-NLS-1$ //$NON-NLS-2$
23

24         PerformanceMeter pm= Performance.getDefault().createPerformanceMeter("scenarioId"); //$NON-NLS-1$
25

26         assertTrue(pm instanceof OSPerformanceMeter);
27     }
28 }
29
Popular Tags