Author: rgreig
Date: Fri Nov 24 05:19:48 2006
New Revision: 478872
URL: http://svn.apache.org/viewvc?view=rev&rev=478872
Log:
Merge of broker/test from trunk revision 478870
Removed:
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/UnitTests.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/ack/TxAckTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/ack/UnitTests.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/configuration/UnitTests.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/HeadersExchangePerformanceTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/HeadersExchangeTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/UnitTests.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/protocol/MockIoSession.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/protocol/TestProtocolInitiation.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/protocol/UnitTests.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/AckTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/ConcurrencyTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/DeliveryManagerTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/MessageTestHelper.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/MockProtocolSession.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/QueueConcurrentPerfTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/QueuePerfTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/SendPerfTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/SubscriptionManagerTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/SubscriptionSetTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/TestSubscription.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/queue/UnitTests.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/store/SkeletonMessageStore.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/store/TestReferenceCounting.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/store/UnitTests.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/txn/TxnBufferTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/txn/UnitTests.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/AveragedRun.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/ConcurrentTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/RunStats.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/TestApplicationRegistry.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/TimedRun.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/UnitTests.java
Modified:
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/configuration/TestPropertyUtils.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/HeadersBindingTest.java
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/LoggingProxyTest.java
Modified:
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/configuration/TestPropertyUtils.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/configuration/TestPropertyUtils.java?view=diff&rev=478872&r1=478871&r2=478872
==============================================================================
---
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/configuration/TestPropertyUtils.java
(original)
+++
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/configuration/TestPropertyUtils.java
Fri Nov 24 05:19:48 2006
@@ -1,32 +1,33 @@
/*
*
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed 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.
+ * 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.
*
*/
package org.apache.qpid.server.configuration;
-import junit.framework.JUnit4TestAdapter;
import org.apache.qpid.configuration.PropertyException;
import org.apache.qpid.configuration.PropertyUtils;
-import static org.junit.Assert.assertEquals;
-import org.junit.Test;
+
+import junit.framework.TestCase;
// TODO: This belongs in the "common" module.
-public class TestPropertyUtils
+public class TestPropertyUtils extends TestCase
{
- @Test
public void testSimpleExpansion() throws PropertyException
{
System.setProperty("banana", "fruity");
@@ -34,7 +35,6 @@
assertEquals(expandedProperty, "fruity");
}
- @Test
public void testDualExpansion() throws PropertyException
{
System.setProperty("banana", "fruity");
@@ -45,6 +45,6 @@
public static junit.framework.Test suite()
{
- return new JUnit4TestAdapter(TestPropertyUtils.class);
+ return new junit.framework.TestSuite(TestPropertyUtils.class);
}
}
Modified:
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/HeadersBindingTest.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/HeadersBindingTest.java?view=diff&rev=478872&r1=478871&r2=478872
==============================================================================
---
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/HeadersBindingTest.java
(original)
+++
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/exchange/HeadersBindingTest.java
Fri Nov 24 05:19:48 2006
@@ -1,40 +1,38 @@
/*
*
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed 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.
+ * 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.
*
*/
package org.apache.qpid.server.exchange;
-import org.junit.Test;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-
-
import java.util.Map;
import java.util.HashMap;
-import junit.framework.JUnit4TestAdapter;
+import junit.framework.TestCase;
/**
*/
-public class HeadersBindingTest
+public class HeadersBindingTest extends TestCase
{
private Map<String, String> bindHeaders = new HashMap<String, String>();
private Map<String, String> matchHeaders = new HashMap<String, String>();
- @Test public void default_1()
+ public void testDefault_1()
{
bindHeaders.put("A", "Value of A");
@@ -43,7 +41,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void default_2()
+ public void testDefault_2()
{
bindHeaders.put("A", "Value of A");
@@ -53,7 +51,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void default_3()
+ public void testDefault_3()
{
bindHeaders.put("A", "Value of A");
@@ -62,7 +60,7 @@
assertFalse(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void all_1()
+ public void testAll_1()
{
bindHeaders.put("X-match", "all");
bindHeaders.put("A", "Value of A");
@@ -72,7 +70,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void all_2()
+ public void testAll_2()
{
bindHeaders.put("X-match", "all");
bindHeaders.put("A", "Value of A");
@@ -83,7 +81,7 @@
assertFalse(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void all_3()
+ public void testAll_3()
{
bindHeaders.put("X-match", "all");
bindHeaders.put("A", "Value of A");
@@ -95,7 +93,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void all_4()
+ public void testAll_4()
{
bindHeaders.put("X-match", "all");
bindHeaders.put("A", "Value of A");
@@ -108,7 +106,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void all_5()
+ public void testAll_5()
{
bindHeaders.put("X-match", "all");
bindHeaders.put("A", "Value of A");
@@ -121,7 +119,7 @@
assertFalse(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void any_1()
+ public void testAny_1()
{
bindHeaders.put("X-match", "any");
bindHeaders.put("A", "Value of A");
@@ -131,7 +129,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void any_2()
+ public void testAny_2()
{
bindHeaders.put("X-match", "any");
bindHeaders.put("A", "Value of A");
@@ -142,7 +140,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void any_3()
+ public void testAny_3()
{
bindHeaders.put("X-match", "any");
bindHeaders.put("A", "Value of A");
@@ -154,7 +152,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void any_4()
+ public void testAny_4()
{
bindHeaders.put("X-match", "any");
bindHeaders.put("A", "Value of A");
@@ -167,7 +165,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void any_5()
+ public void testAny_5()
{
bindHeaders.put("X-match", "any");
bindHeaders.put("A", "Value of A");
@@ -180,7 +178,7 @@
assertTrue(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
- @Test public void any_6()
+ public void testAny_6()
{
bindHeaders.put("X-match", "any");
bindHeaders.put("A", "Value of A");
@@ -192,9 +190,9 @@
assertFalse(new HeadersBinding(bindHeaders).matches(matchHeaders));
}
+
public static junit.framework.Test suite()
{
- return new JUnit4TestAdapter(HeadersBindingTest.class);
+ return new junit.framework.TestSuite(HeadersBindingTest.class);
}
-
}
Modified:
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/LoggingProxyTest.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/LoggingProxyTest.java?view=diff&rev=478872&r1=478871&r2=478872
==============================================================================
---
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/LoggingProxyTest.java
(original)
+++
incubator/qpid/branches/new_persistence/java/broker/src/test/java/org/apache/qpid/server/util/LoggingProxyTest.java
Fri Nov 24 05:19:48 2006
@@ -1,32 +1,32 @@
/*
*
- * Copyright (c) 2006 The Apache Software Foundation
- *
- * Licensed 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.
+ * 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.
*
*/
package org.apache.qpid.server.util;
-import junit.framework.JUnit4TestAdapter;
-import org.junit.Assert;
-import static org.junit.Assert.assertEquals;
-import org.junit.Test;
-
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
-public class LoggingProxyTest
+import junit.framework.TestCase;
+
+public class LoggingProxyTest extends TestCase
{
static interface IFoo {
void foo();
@@ -55,35 +55,34 @@
}
}
- @Test
- public void simple() {
+ public void testSimple() {
LoggingProxy proxy = new LoggingProxy(new Foo(), 20);
IFoo foo = (IFoo)proxy.getProxy(IFoo.class);
foo.foo();
assertEquals(2, proxy.getBufferSize());
- Assert.assertTrue(proxy.getBuffer().get(0).toString().matches(".*:
foo\\(\\) entered$"));
- Assert.assertTrue(proxy.getBuffer().get(1).toString().matches(".*:
foo\\(\\) returned$"));
+ assertTrue(proxy.getBuffer().get(0).toString().matches(".*: foo\\(\\)
entered$"));
+ assertTrue(proxy.getBuffer().get(1).toString().matches(".*: foo\\(\\)
returned$"));
foo.foo(3, Arrays.asList(0, 1, 2));
assertEquals(4, proxy.getBufferSize());
- Assert.assertTrue(proxy.getBuffer().get(2).toString().matches(".*:
foo\\(\\[3, \\[0, 1, 2\\]\\]\\) entered$"));
- Assert.assertTrue(proxy.getBuffer().get(3).toString().matches(".*:
foo\\(\\) returned$"));
+ assertTrue(proxy.getBuffer().get(2).toString().matches(".*:
foo\\(\\[3, \\[0, 1, 2\\]\\]\\) entered$"));
+ assertTrue(proxy.getBuffer().get(3).toString().matches(".*: foo\\(\\)
returned$"));
foo.bar();
assertEquals(6, proxy.getBufferSize());
- Assert.assertTrue(proxy.getBuffer().get(4).toString().matches(".*:
bar\\(\\) entered$"));
- Assert.assertTrue(proxy.getBuffer().get(5).toString().matches(".*:
bar\\(\\) returned null$"));
+ assertTrue(proxy.getBuffer().get(4).toString().matches(".*: bar\\(\\)
entered$"));
+ assertTrue(proxy.getBuffer().get(5).toString().matches(".*: bar\\(\\)
returned null$"));
foo.bar("hello", Arrays.asList(1, 2, 3));
assertEquals(8, proxy.getBufferSize());
- Assert.assertTrue(proxy.getBuffer().get(6).toString().matches(".*:
bar\\(\\[hello, \\[1, 2, 3\\]\\]\\) entered$"));
- Assert.assertTrue(proxy.getBuffer().get(7).toString().matches(".*:
bar\\(\\) returned ha$"));
+ assertTrue(proxy.getBuffer().get(6).toString().matches(".*:
bar\\(\\[hello, \\[1, 2, 3\\]\\]\\) entered$"));
+ assertTrue(proxy.getBuffer().get(7).toString().matches(".*: bar\\(\\)
returned ha$"));
proxy.dump();
}
public static junit.framework.Test suite()
{
- return new JUnit4TestAdapter(LoggingProxyTest.class);
+ return new junit.framework.TestSuite(LoggingProxyTest.class);
}
}