Skip to content

Commit 2dcc234

Browse files
committed
Commit newly-written replacement for mysteriously-missing test source file
1 parent b1e270a commit 2dcc234

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// The contents of this file are subject to the Mozilla Public License
2+
// Version 1.1 (the "License"); you may not use this file except in
3+
// compliance with the License. You may obtain a copy of the License at
4+
// http://www.mozilla.org/MPL/
5+
//
6+
// Software distributed under the License is distributed on an "AS IS"
7+
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
8+
// License for the specific language governing rights and limitations
9+
// under the License.
10+
//
11+
// The Original Code is RabbitMQ.
12+
//
13+
// The Initial Developers of the Original Code are LShift Ltd,
14+
// Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
15+
//
16+
// Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
17+
// Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
18+
// are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
19+
// Technologies LLC, and Rabbit Technologies Ltd.
20+
//
21+
// Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift
22+
// Ltd. Portions created by Cohesive Financial Technologies LLC are
23+
// Copyright (C) 2007-2009 Cohesive Financial Technologies
24+
// LLC. Portions created by Rabbit Technologies Ltd are Copyright
25+
// (C) 2007-2009 Rabbit Technologies Ltd.
26+
//
27+
// All Rights Reserved.
28+
//
29+
// Contributor(s): ______________________________________.
30+
//
31+
package com.rabbitmq.client.test;
32+
33+
import junit.framework.TestCase;
34+
35+
import com.rabbitmq.client.AMQP.BasicProperties;
36+
import com.rabbitmq.client.MessageProperties;
37+
38+
public class ClonePropertiesTest extends TestCase {
39+
public void testPropertyCloneIsDistinct()
40+
throws CloneNotSupportedException
41+
{
42+
assertTrue(MessageProperties.MINIMAL_PERSISTENT_BASIC !=
43+
MessageProperties.MINIMAL_PERSISTENT_BASIC.clone());
44+
}
45+
46+
public void testPropertyClonePreservesValues()
47+
throws CloneNotSupportedException
48+
{
49+
assertEquals(MessageProperties.MINIMAL_PERSISTENT_BASIC.deliveryMode,
50+
((BasicProperties) MessageProperties.MINIMAL_PERSISTENT_BASIC.clone())
51+
.deliveryMode);
52+
assertEquals((Integer) 2,
53+
((BasicProperties) MessageProperties.MINIMAL_PERSISTENT_BASIC.clone())
54+
.deliveryMode);
55+
}
56+
}

0 commit comments

Comments
 (0)