Author: sebb
Date: Mon Sep 21 20:15:25 2009
New Revision: 817395
URL: http://svn.apache.org/viewvc?rev=817395&view=rev
Log:
Add AL headers
Update tests to improve coverage
Modified:
jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java
jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java
jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java
Modified: jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java?rev=817395&r1=817394&r2=817395&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java (original)
+++ jakarta/jmeter/trunk/src/junit/woolfel/DummyTestCase.java Mon Sep 21
20:15:25 2009
@@ -1,41 +1,45 @@
/*
- * Created on Jul 24, 2005
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
*/
+
package woolfel;
import junit.framework.TestCase;
-/**
- * @author pete
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
public class DummyTestCase extends TestCase {
- /**
- *
- */
public DummyTestCase() {
super();
+ System.out.println("public DummyTestCase()");
}
- /**
- * @param arg0
- */
protected DummyTestCase(String arg0) {
super(arg0);
+ System.out.println("protected DummyTestCase("+arg0+")");
}
+ @Override
public void setUp(){
- System.out.println("setup called");
+ System.out.println("DummyTestCase#setup(): "+getName());
}
+ @Override
public void tearDown(){
- System.out.println("tearDown called");
+ System.out.println("DummyTestCase#tearDown(): "+getName());
}
public void testMethodPass() {
@@ -73,4 +77,15 @@
e.printStackTrace();
}
}
+
+ // Normal test failure
+ public void testFail() {
+ fail("Test failure");
+ }
+
+ // Generate test error
+ public void testException() {
+ @SuppressWarnings("unused")
+ int i = 27 / 0; // will generate Divide by zero error
+ }
}
Modified: jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java?rev=817395&r1=817394&r2=817395&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java (original)
+++ jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest.java Mon Sep 21
20:15:25 2009
@@ -1,40 +1,40 @@
/*
- * Created on Jul 28, 2005
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
*/
+
package woolfel;
-/**
- * @author pete
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
public class SubDummyTest extends DummyTestCase {
- /**
- *
- */
public SubDummyTest() {
super();
- // TODO Auto-generated constructor stub
+ System.out.println("public SubDummyTest()");
}
- /**
- * @param arg0
- */
public SubDummyTest(String arg0) {
super(arg0);
- // TODO Auto-generated constructor stub
+ System.out.println("public SubDummyTest("+arg0+")");
}
public void oneTimeSetUp() {
- System.out.println("oneTimeSetUp called -- ");
+ System.out.println("SubDummyTest#oneTimeSetUp(): "+getName());
}
public void oneTimeTearDown() {
- System.out.println("oneTimeTearDown called -- ");
+ System.out.println("SubDummyTest#oneTimeTearDown(): "+getName());
}
}
Modified: jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java?rev=817395&r1=817394&r2=817395&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java (original)
+++ jakarta/jmeter/trunk/src/junit/woolfel/SubDummyTest2.java Mon Sep 21
20:15:25 2009
@@ -1,40 +1,41 @@
/*
- * Created on Jul 28, 2005
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
*/
+
package woolfel;
-/**
- * @author pete
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
public class SubDummyTest2 extends DummyTestCase {
- /**
- *
- */
- private SubDummyTest2() {
+ @SuppressWarnings("unused")
+ private SubDummyTest2() {
super();
- System.out.println("private empty constructor");
+ System.out.println("private SubDummyTest2()");
}
- /**
- * @param arg0
- */
public SubDummyTest2(String arg0) {
super(arg0);
- System.out.println("public string constructor");
+ System.out.println("public SubDummyTest2("+arg0+")");
}
public void oneTimeSetUp() {
- System.out.println("oneTimeSetUp called -- ");
+ System.out.println("SubDummyTest2#oneTimeSetUp(): "+getName());
}
public void oneTimeTearDown() {
- System.out.println("oneTimeTearDown called -- ");
+ System.out.println("SubDummyTest2#oneTimeTearDown(): "+getName());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]