You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2006/10/09 22:59:17 UTC
svn commit: r454506 [9/11] - in
/incubator/activemq/activemq-dotnet/trunk/src: main/csharp/ActiveMQ/
main/csharp/ActiveMQ/Commands/ main/csharp/ActiveMQ/OpenWire/
main/csharp/ActiveMQ/OpenWire/V2/ main/csharp/ActiveMQ/Transport/
main/csharp/ActiveMQ/Ut...
Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs Mon Oct 9 13:59:14 2006
@@ -1,28 +1,28 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.42
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-[assembly: ComVisibleAttribute(false)]
-[assembly: CLSCompliantAttribute(true)]
-[assembly: AssemblyTitleAttribute("Apache NMS Class Library")]
-[assembly: AssemblyDescriptionAttribute("NMS (.Net Messaging Library): An abstract interface to Message Oriented Middlewar" +
- "e (MOM) providers")]
-[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
-[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
-[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
-[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
-[assembly: AssemblyTrademarkAttribute("")]
-[assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("4.0")]
-[assembly: AssemblyInformationalVersionAttribute("4.0")]
-
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyTitleAttribute("Apache NMS Class Library")]
+[assembly: AssemblyDescriptionAttribute("NMS (.Net Messaging Library): An abstract interface to Message Oriented Middlewar" +
+ "e (MOM) providers")]
+[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
+[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
+[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
+[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
+[assembly: AssemblyTrademarkAttribute("")]
+[assembly: AssemblyCultureAttribute("")]
+[assembly: AssemblyVersionAttribute("4.0")]
+[assembly: AssemblyInformationalVersionAttribute("4.0")]
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/CommonAssemblyInfo.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/NMSSecurityException.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/NMSSecurityException.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/NMSSecurityException.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/NMSSecurityException.cs Mon Oct 9 13:59:14 2006
@@ -1,31 +1,31 @@
-/*
- * 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.
- */
-namespace NMS
-{
- /// <summary>
- /// Represents a connection failure.
- /// </summary>
- public class NMSSecurityException : NMSException
- {
- public NMSSecurityException(string message)
- : base(message)
- {
- }
- }
-}
-
-
+/*
+ * 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.
+ */
+namespace NMS
+{
+ /// <summary>
+ /// Represents a connection failure.
+ /// </summary>
+ public class NMSSecurityException : NMSException
+ {
+ public NMSSecurityException(string message)
+ : base(message)
+ {
+ }
+ }
+}
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/NMS/NMSSecurityException.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs Mon Oct 9 13:59:14 2006
@@ -1,35 +1,35 @@
-/*
- * 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.
- */
-using ActiveMQ;
-using NMS;
-using NUnit.Framework;
-using System;
-
-namespace ActiveMQ
-{
- [TestFixture]
- public class BadConsumeTest : NMS.Test.BadConsumeTest
- {
- private String brokerURI = "tcp://localhost:61616";
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
- }
-}
-
-
+/*
+ * 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.
+ */
+using ActiveMQ;
+using NMS;
+using NUnit.Framework;
+using System;
+
+namespace ActiveMQ
+{
+ [TestFixture]
+ public class BadConsumeTest : NMS.Test.BadConsumeTest
+ {
+ private String brokerURI = "tcp://localhost:61616";
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+ }
+}
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BadConsumeTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs Mon Oct 9 13:59:14 2006
@@ -1,36 +1,36 @@
-/*
- * 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.
- */
-using ActiveMQ;
-using NMS;
-using NUnit.Framework;
-using System;
-
-namespace ActiveMQ
-{
- [TestFixture]
- public class BytesMessageTest : NMS.Test.BytesMessageTest
- {
- private String brokerURI = "tcp://localhost:61616";
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
- }
-}
-
-
-
+/*
+ * 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.
+ */
+using ActiveMQ;
+using NMS;
+using NUnit.Framework;
+using System;
+
+namespace ActiveMQ
+{
+ [TestFixture]
+ public class BytesMessageTest : NMS.Test.BytesMessageTest
+ {
+ private String brokerURI = "tcp://localhost:61616";
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+ }
+}
+
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/BytesMessageTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs Mon Oct 9 13:59:14 2006
@@ -1,27 +1,27 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.42
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-[assembly: ComVisibleAttribute(false)]
-[assembly: CLSCompliantAttribute(true)]
-[assembly: AssemblyTitleAttribute("Apache ActiveMQ .NET Tests")]
-[assembly: AssemblyDescriptionAttribute("Unit Tests for the NMS (.Net Messaging Library) to Apache ActiveMQ")]
-[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
-[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
-[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
-[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
-[assembly: AssemblyTrademarkAttribute("")]
-[assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("4.0")]
-[assembly: AssemblyInformationalVersionAttribute("4.0")]
-
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyTitleAttribute("Apache ActiveMQ .NET Tests")]
+[assembly: AssemblyDescriptionAttribute("Unit Tests for the NMS (.Net Messaging Library) to Apache ActiveMQ")]
+[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
+[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
+[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
+[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
+[assembly: AssemblyTrademarkAttribute("")]
+[assembly: AssemblyCultureAttribute("")]
+[assembly: AssemblyVersionAttribute("4.0")]
+[assembly: AssemblyInformationalVersionAttribute("4.0")]
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/CommonAssemblyInfo.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs Mon Oct 9 13:59:14 2006
@@ -1,37 +1,37 @@
-/*
- * 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.
- */
-using ActiveMQ;
-using NMS;
-using NUnit.Framework;
-using System;
-
-namespace ActiveMQ
-{
- [TestFixture]
- public class ConsumerTest : NMS.Test.ConsumerTest
- {
-
- private String brokerURI = "tcp://localhost:61616";
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
- }
-}
-
-
-
+/*
+ * 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.
+ */
+using ActiveMQ;
+using NMS;
+using NUnit.Framework;
+using System;
+
+namespace ActiveMQ
+{
+ [TestFixture]
+ public class ConsumerTest : NMS.Test.ConsumerTest
+ {
+
+ private String brokerURI = "tcp://localhost:61616";
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+ }
+}
+
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/ConsumerTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs Mon Oct 9 13:59:14 2006
@@ -1,33 +1,33 @@
-/*
- * 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.
- */
-using System;
-using NMS;
-using NUnit.Framework;
-
-namespace ActiveMQ
-{
- [TestFixture]
- public class DurableTest : NMS.Test.DurableTest
- {
- private String brokerURI = "tcp://localhost:61616";
-
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
- }
+/*
+ * 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.
+ */
+using System;
+using NMS;
+using NUnit.Framework;
+
+namespace ActiveMQ
+{
+ [TestFixture]
+ public class DurableTest : NMS.Test.DurableTest
+ {
+ private String brokerURI = "tcp://localhost:61616";
+
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+ }
}
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/DurableTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/JMSPropertyTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/JMSPropertyTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/JMSPropertyTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/JMSPropertyTest.cs Mon Oct 9 13:59:14 2006
@@ -1,37 +1,37 @@
-/*
- * 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.
- */
-//using ActiveMQ;
-using ActiveMQ;
-using NMS;
-using NUnit.Framework;
-using System;
-
-namespace ActiveMQ
-{
- [ TestFixture ]
- public class NMSPropertyTest : NMS.Test.NMSPropertyTest
- {
- private String brokerURI = "tcp://localhost:61616";
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
- }
-}
-
-
-
+/*
+ * 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.
+ */
+//using ActiveMQ;
+using ActiveMQ;
+using NMS;
+using NUnit.Framework;
+using System;
+
+namespace ActiveMQ
+{
+ [ TestFixture ]
+ public class NMSPropertyTest : NMS.Test.NMSPropertyTest
+ {
+ private String brokerURI = "tcp://localhost:61616";
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+ }
+}
+
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/JMSPropertyTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs Mon Oct 9 13:59:14 2006
@@ -1,37 +1,37 @@
-/*
- * 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.
- */
-using ActiveMQ;
-using NMS;
-using NUnit.Framework;
-using System;
-
-namespace ActiveMQ
-{
- [ TestFixture ]
- public class MapMessageTest : NMS.Test.MapMessageTest
- {
-
- private String brokerURI = "tcp://localhost:61616";
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
-
- }
-}
-
-
+/*
+ * 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.
+ */
+using ActiveMQ;
+using NMS;
+using NUnit.Framework;
+using System;
+
+namespace ActiveMQ
+{
+ [ TestFixture ]
+ public class MapMessageTest : NMS.Test.MapMessageTest
+ {
+
+ private String brokerURI = "tcp://localhost:61616";
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+
+ }
+}
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/MapMessageTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs Mon Oct 9 13:59:14 2006
@@ -1,33 +1,33 @@
-/*
- * 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.
- */
-using ActiveMQ;
-using NMS;
-using NUnit.Framework;
-using System;
-
-namespace ActiveMQ
-{
- [ TestFixture ]
- public class TemporaryQueueTest : NMS.Test.TemporaryQueueTest
- {
- private String brokerURI = "tcp://localhost:61616";
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
- }
-}
+/*
+ * 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.
+ */
+using ActiveMQ;
+using NMS;
+using NUnit.Framework;
+using System;
+
+namespace ActiveMQ
+{
+ [ TestFixture ]
+ public class TemporaryQueueTest : NMS.Test.TemporaryQueueTest
+ {
+ private String brokerURI = "tcp://localhost:61616";
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+ }
+}
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TemporaryQueueTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs Mon Oct 9 13:59:14 2006
@@ -1,36 +1,36 @@
-/*
- * 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.
- */
-using ActiveMQ;
-using NMS;
-using NUnit.Framework;
-using System;
-
-namespace ActiveMQ
-{
- [ TestFixture ]
- public class TextMessage : NMS.Test.TextMessage
- {
- private String brokerURI = "tcp://localhost:61616";
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
- }
-}
-
-
-
+/*
+ * 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.
+ */
+using ActiveMQ;
+using NMS;
+using NUnit.Framework;
+using System;
+
+namespace ActiveMQ
+{
+ [ TestFixture ]
+ public class TextMessage : NMS.Test.TextMessage
+ {
+ private String brokerURI = "tcp://localhost:61616";
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+ }
+}
+
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TextMessage.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs Mon Oct 9 13:59:14 2006
@@ -1,38 +1,38 @@
-/*
- * 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.
- */
-using ActiveMQ;
-using NMS;
-using NUnit.Framework;
-using System;
-
-
-namespace ActiveMQ
-{
- [TestFixture]
- public class TransactionTest : NMS.Test.TransactionTest
- {
-
- private String brokerURI = "tcp://localhost:61616";
- protected override IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory(new Uri(brokerURI));
- }
-
- }
-}
-
-
+/*
+ * 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.
+ */
+using ActiveMQ;
+using NMS;
+using NUnit.Framework;
+using System;
+
+
+namespace ActiveMQ
+{
+ [TestFixture]
+ public class TransactionTest : NMS.Test.TransactionTest
+ {
+
+ private String brokerURI = "tcp://localhost:61616";
+ protected override IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory(new Uri(brokerURI));
+ }
+
+ }
+}
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/ActiveMQ/TransactionTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/MSMQTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/MSMQTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/MSMQTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/MSMQTest.cs Mon Oct 9 13:59:14 2006
@@ -1,126 +1,126 @@
-/*
- * 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.
- */
-using NUnit.Framework;
-using System;
-using System.Messaging;
-
-namespace MSMQ
-{
- /// <summary>
- /// Use to test and verify MSMQ behaviour.
- /// </summary>
- [TestFixture]
- public class MSMQTest
- {
- String queueName = ".\\Private$\\FOO";
-
- [SetUp]
- public void SetUp()
- {
- }
-
- [TearDown]
- public void TearDown()
- {
- }
-
- [Test]
- public void TestSendAndReceive()
- {
- // check to make sure the message queue does not exist already
- if (!MessageQueue.Exists(queueName))
- {
- // create the new message queue and make it transactional
- MessageQueue MQ = MessageQueue.Create(queueName, true);
-
- // set the label name and close the message queue
- MQ.Label = "FOO";
- MQ.Close();
-
- Console.WriteLine("Created Queue: " + queueName);
- //Assert.Fail("Should have thrown an exception!");
- }
- else
- {
- Console.WriteLine("Queue Existed: " + queueName);
-
- }
-
-
- if (!MessageQueue.Exists(".\\Private$\\BAR"))
- {
- // create the new message queue and make it transactional
- MessageQueue MQ = MessageQueue.Create(".\\Private$\\BAR", true);
-
- // set the label name and close the message queue
- MQ.Label = "BAR Label";
- MQ.Close();
-
- }
- else
- {
- Console.WriteLine("Queue Existed: " + queueName);
-
- }
-
- // create a message queue transaction and start it
- MessageQueueTransaction Transaction = new MessageQueueTransaction();
- Transaction.Begin();
-
- MessageQueue MQueue = new MessageQueue(queueName);
-
- Message Msg = new Message("Hello World");
- Msg.ResponseQueue = new MessageQueue(".\\Private$\\BAR");
- Msg.Priority = MessagePriority.Normal;
- Msg.UseJournalQueue = true;
- Msg.Label = "Test Label";
-
- Msg.AcknowledgeType = AcknowledgeTypes.FullReceive;
- Msg.AdministrationQueue = Msg.ResponseQueue;
-
- // send the message
- MQueue.Send(Msg, Transaction);
- MQueue.Send(Msg, Transaction);
- MQueue.Send(Msg, Transaction);
-
- // commit the transaction
- Transaction.Commit();
-
-
- // Read the message.
- MQueue.MessageReadPropertyFilter.SetAll();
-
- // the target type we have stored in the message body
-
- ((XmlMessageFormatter)MQueue.Formatter).TargetTypes = new Type[] { typeof(String) };
-
- // read the message from the queue, but only wait for 5 sec
- Msg = MQueue.Receive(new TimeSpan(0, 0, 5));
-
- // read the order from the message body
- Console.WriteLine("Received: "+Msg.Body);
-
-
- // close the mesage queue
- MQueue.Close();
- }
-
- }
-}
-
-
-
+/*
+ * 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.
+ */
+using NUnit.Framework;
+using System;
+using System.Messaging;
+
+namespace MSMQ
+{
+ /// <summary>
+ /// Use to test and verify MSMQ behaviour.
+ /// </summary>
+ [TestFixture]
+ public class MSMQTest
+ {
+ String queueName = ".\\Private$\\FOO";
+
+ [SetUp]
+ public void SetUp()
+ {
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ }
+
+ [Test]
+ public void TestSendAndReceive()
+ {
+ // check to make sure the message queue does not exist already
+ if (!MessageQueue.Exists(queueName))
+ {
+ // create the new message queue and make it transactional
+ MessageQueue MQ = MessageQueue.Create(queueName, true);
+
+ // set the label name and close the message queue
+ MQ.Label = "FOO";
+ MQ.Close();
+
+ Console.WriteLine("Created Queue: " + queueName);
+ //Assert.Fail("Should have thrown an exception!");
+ }
+ else
+ {
+ Console.WriteLine("Queue Existed: " + queueName);
+
+ }
+
+
+ if (!MessageQueue.Exists(".\\Private$\\BAR"))
+ {
+ // create the new message queue and make it transactional
+ MessageQueue MQ = MessageQueue.Create(".\\Private$\\BAR", true);
+
+ // set the label name and close the message queue
+ MQ.Label = "BAR Label";
+ MQ.Close();
+
+ }
+ else
+ {
+ Console.WriteLine("Queue Existed: " + queueName);
+
+ }
+
+ // create a message queue transaction and start it
+ MessageQueueTransaction Transaction = new MessageQueueTransaction();
+ Transaction.Begin();
+
+ MessageQueue MQueue = new MessageQueue(queueName);
+
+ Message Msg = new Message("Hello World");
+ Msg.ResponseQueue = new MessageQueue(".\\Private$\\BAR");
+ Msg.Priority = MessagePriority.Normal;
+ Msg.UseJournalQueue = true;
+ Msg.Label = "Test Label";
+
+ Msg.AcknowledgeType = AcknowledgeTypes.FullReceive;
+ Msg.AdministrationQueue = Msg.ResponseQueue;
+
+ // send the message
+ MQueue.Send(Msg, Transaction);
+ MQueue.Send(Msg, Transaction);
+ MQueue.Send(Msg, Transaction);
+
+ // commit the transaction
+ Transaction.Commit();
+
+
+ // Read the message.
+ MQueue.MessageReadPropertyFilter.SetAll();
+
+ // the target type we have stored in the message body
+
+ ((XmlMessageFormatter)MQueue.Formatter).TargetTypes = new Type[] { typeof(String) };
+
+ // read the message from the queue, but only wait for 5 sec
+ Msg = MQueue.Receive(new TimeSpan(0, 0, 5));
+
+ // read the order from the message body
+ Console.WriteLine("Received: "+Msg.Body);
+
+
+ // close the mesage queue
+ MQueue.Close();
+ }
+
+ }
+}
+
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/MSMQTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/ProducerTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/ProducerTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/ProducerTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/ProducerTest.cs Mon Oct 9 13:59:14 2006
@@ -1,66 +1,66 @@
-/*
- * 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.
- */
-using NMS;
-using NUnit.Framework;
-
-namespace MSMQ
-{
- [TestFixture]
- public class ProducerTest : NMS.Test.NMSTestSupport
- {
-
- [SetUp]
- override public void SetUp()
- {
- base.SetUp();
- }
-
- [TearDown]
- override public void TearDown()
- {
- base.TearDown();
- }
-
- override protected IConnectionFactory CreateConnectionFactory()
- {
- return new ConnectionFactory();
- }
-
- protected override string CreateDestinationName()
- {
- return ".\\Private$\\" + GetType().Name;
- }
-
- [Test]
- public void TestPublishMessage()
- {
- IMessageProducer producer = Session.CreateProducer(Destination);
- producer.Persistent = true;
-
- // Send the messages
- ITextMessage message = Session.CreateTextMessage("1st");
-// message.Properties["color"] = "red";
- producer.Send(message);
-
-
- }
-
- }
-}
-
-
-
+/*
+ * 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.
+ */
+using NMS;
+using NUnit.Framework;
+
+namespace MSMQ
+{
+ [TestFixture]
+ public class ProducerTest : NMS.Test.NMSTestSupport
+ {
+
+ [SetUp]
+ override public void SetUp()
+ {
+ base.SetUp();
+ }
+
+ [TearDown]
+ override public void TearDown()
+ {
+ base.TearDown();
+ }
+
+ override protected IConnectionFactory CreateConnectionFactory()
+ {
+ return new ConnectionFactory();
+ }
+
+ protected override string CreateDestinationName()
+ {
+ return ".\\Private$\\" + GetType().Name;
+ }
+
+ [Test]
+ public void TestPublishMessage()
+ {
+ IMessageProducer producer = Session.CreateProducer(Destination);
+ producer.Persistent = true;
+
+ // Send the messages
+ ITextMessage message = Session.CreateTextMessage("1st");
+// message.Properties["color"] = "red";
+ producer.Send(message);
+
+
+ }
+
+ }
+}
+
+
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/MSMQ/ProducerTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/AsyncConsumeTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/AsyncConsumeTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/AsyncConsumeTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/AsyncConsumeTest.cs Mon Oct 9 13:59:14 2006
@@ -1,148 +1,148 @@
-/*
- * 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.
- */
-using System;
-using System.Threading;
-using NUnit.Framework;
-
-namespace NMS.Test
-{
- [TestFixture]
- public abstract class AsyncConsumeTest : NMSTestSupport
- {
- protected Object semaphore = new Object();
- protected bool received;
-
-
- [SetUp]
- public override void SetUp()
- {
- base.SetUp();
- }
-
- [TearDown]
- public override void TearDown()
- {
- base.TearDown();
- }
-
- [Test]
- public void TestAsynchronousConsume()
- {
- // START SNIPPET: demo
- IMessageConsumer consumer = Session.CreateConsumer(Destination);
- consumer.Listener += new MessageListener(OnMessage);
- // END SNIPPET: demo
-
- // now lets send a message
- IMessageProducer producer = CreateProducer();
- IMessage request = CreateMessage();
- request.NMSCorrelationID = "abc";
- request.NMSType = "Test";
- producer.Send(request);
-
- WaitForMessageToArrive();
- }
-
- [Test]
- public void TestCreateConsumerAfterSend()
- {
- // now lets send a message
- IMessageProducer producer = CreateProducer();
- IMessage request = CreateMessage();
- request.NMSCorrelationID = "abc";
- request.NMSType = "Test";
- producer.Send(request);
-
- // lets create an async consumer
- IMessageConsumer consumer = Session.CreateConsumer(Destination);
- consumer.Listener += new MessageListener(OnMessage);
-
- WaitForMessageToArrive();
- }
-
- [Test]
- public void TestCreateConsumerBeforeSendButAddListenerAfterSend()
- {
- // lets create an async consumer
- IMessageConsumer consumer = Session.CreateConsumer(Destination);
-
- // now lets send a message
- IMessageProducer producer = CreateProducer();
- IMessage request = CreateMessage();
- request.NMSCorrelationID = "abc";
- request.NMSType = "Test";
- producer.Send(request);
-
- // now lets add the listener
- consumer.Listener += new MessageListener(OnMessage);
-
- WaitForMessageToArrive();
- }
-
- [Test]
- public void TextMessageSRExample()
- {
- using (IConnection connection = Factory.CreateConnection())
- {
- AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
- ISession session = connection.CreateSession(acknowledgementMode);
-
- IDestination destination = session.GetQueue("FOO.BAR");
-
- // lets create a consumer and producer
- IMessageConsumer consumer = session.CreateConsumer(destination);
- consumer.Listener += new MessageListener(OnMessage);
-
- IMessageProducer producer = session.CreateProducer(destination);
- producer.Persistent = true;
-
- // lets send a message
- ITextMessage request = session.CreateTextMessage(
- "HelloWorld!");
- request.NMSCorrelationID = "abc";
- request.Properties["NMSXGroupID"] = "cheese";
- request.Properties["myHeader"] = "James";
-
- producer.Send(request);
-
- WaitForMessageToArrive();
- }
- }
-
- protected void OnMessage(IMessage message)
- {
- Console.WriteLine("Received message: " + message);
- lock (semaphore)
- {
- received = true;
- Monitor.PulseAll(semaphore);
- }
- }
-
- protected void WaitForMessageToArrive()
- {
- lock (semaphore)
- {
- if (!received)
- {
- Monitor.Wait(semaphore, receiveTimeout);
- }
- Assert.AreEqual(true, received, "Should have received a message by now!");
- }
- }
- }
+/*
+ * 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.
+ */
+using System;
+using System.Threading;
+using NUnit.Framework;
+
+namespace NMS.Test
+{
+ [TestFixture]
+ public abstract class AsyncConsumeTest : NMSTestSupport
+ {
+ protected Object semaphore = new Object();
+ protected bool received;
+
+
+ [SetUp]
+ public override void SetUp()
+ {
+ base.SetUp();
+ }
+
+ [TearDown]
+ public override void TearDown()
+ {
+ base.TearDown();
+ }
+
+ [Test]
+ public void TestAsynchronousConsume()
+ {
+ // START SNIPPET: demo
+ IMessageConsumer consumer = Session.CreateConsumer(Destination);
+ consumer.Listener += new MessageListener(OnMessage);
+ // END SNIPPET: demo
+
+ // now lets send a message
+ IMessageProducer producer = CreateProducer();
+ IMessage request = CreateMessage();
+ request.NMSCorrelationID = "abc";
+ request.NMSType = "Test";
+ producer.Send(request);
+
+ WaitForMessageToArrive();
+ }
+
+ [Test]
+ public void TestCreateConsumerAfterSend()
+ {
+ // now lets send a message
+ IMessageProducer producer = CreateProducer();
+ IMessage request = CreateMessage();
+ request.NMSCorrelationID = "abc";
+ request.NMSType = "Test";
+ producer.Send(request);
+
+ // lets create an async consumer
+ IMessageConsumer consumer = Session.CreateConsumer(Destination);
+ consumer.Listener += new MessageListener(OnMessage);
+
+ WaitForMessageToArrive();
+ }
+
+ [Test]
+ public void TestCreateConsumerBeforeSendButAddListenerAfterSend()
+ {
+ // lets create an async consumer
+ IMessageConsumer consumer = Session.CreateConsumer(Destination);
+
+ // now lets send a message
+ IMessageProducer producer = CreateProducer();
+ IMessage request = CreateMessage();
+ request.NMSCorrelationID = "abc";
+ request.NMSType = "Test";
+ producer.Send(request);
+
+ // now lets add the listener
+ consumer.Listener += new MessageListener(OnMessage);
+
+ WaitForMessageToArrive();
+ }
+
+ [Test]
+ public void TextMessageSRExample()
+ {
+ using (IConnection connection = Factory.CreateConnection())
+ {
+ AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
+ ISession session = connection.CreateSession(acknowledgementMode);
+
+ IDestination destination = session.GetQueue("FOO.BAR");
+
+ // lets create a consumer and producer
+ IMessageConsumer consumer = session.CreateConsumer(destination);
+ consumer.Listener += new MessageListener(OnMessage);
+
+ IMessageProducer producer = session.CreateProducer(destination);
+ producer.Persistent = true;
+
+ // lets send a message
+ ITextMessage request = session.CreateTextMessage(
+ "HelloWorld!");
+ request.NMSCorrelationID = "abc";
+ request.Properties["NMSXGroupID"] = "cheese";
+ request.Properties["myHeader"] = "James";
+
+ producer.Send(request);
+
+ WaitForMessageToArrive();
+ }
+ }
+
+ protected void OnMessage(IMessage message)
+ {
+ Console.WriteLine("Received message: " + message);
+ lock (semaphore)
+ {
+ received = true;
+ Monitor.PulseAll(semaphore);
+ }
+ }
+
+ protected void WaitForMessageToArrive()
+ {
+ lock (semaphore)
+ {
+ if (!received)
+ {
+ Monitor.Wait(semaphore, receiveTimeout);
+ }
+ Assert.AreEqual(true, received, "Should have received a message by now!");
+ }
+ }
+ }
}
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/AsyncConsumeTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BadConsumeTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BadConsumeTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BadConsumeTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BadConsumeTest.cs Mon Oct 9 13:59:14 2006
@@ -1,53 +1,53 @@
-/*
- * 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.
- */
-using System;
-using NUnit.Framework;
-
-namespace NMS.Test
-{
- [TestFixture]
- public abstract class BadConsumeTest : NMSTestSupport
- {
- [SetUp]
- public override void SetUp()
- {
- base.SetUp();
- }
-
- [TearDown]
- public override void TearDown()
- {
- base.TearDown();
- }
-
- [Test]
- public void TestBadConsumeOperationToTestExceptions()
- {
- try
- {
- IMessageConsumer consumer = Session.CreateConsumer(null);
- Console.WriteLine("Created consumer: " + consumer);
- Assert.Fail("Should have thrown an exception!");
- }
- catch (Exception e)
- {
- Console.WriteLine("Caught expected exception: " + e);
- Console.WriteLine("Stack: " + e.StackTrace);
- }
- }
- }
+/*
+ * 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.
+ */
+using System;
+using NUnit.Framework;
+
+namespace NMS.Test
+{
+ [TestFixture]
+ public abstract class BadConsumeTest : NMSTestSupport
+ {
+ [SetUp]
+ public override void SetUp()
+ {
+ base.SetUp();
+ }
+
+ [TearDown]
+ public override void TearDown()
+ {
+ base.TearDown();
+ }
+
+ [Test]
+ public void TestBadConsumeOperationToTestExceptions()
+ {
+ try
+ {
+ IMessageConsumer consumer = Session.CreateConsumer(null);
+ Console.WriteLine("Created consumer: " + consumer);
+ Assert.Fail("Should have thrown an exception!");
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Caught expected exception: " + e);
+ Console.WriteLine("Stack: " + e.StackTrace);
+ }
+ }
+ }
}
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BadConsumeTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BytesMessageTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BytesMessageTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BytesMessageTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BytesMessageTest.cs Mon Oct 9 13:59:14 2006
@@ -1,63 +1,63 @@
-/*
- * 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.
- */
-using System;
-using NUnit.Framework;
-
-namespace NMS.Test
-{
- [TestFixture]
- public abstract class BytesMessageTest : NMSTestSupport
- {
- private byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8};
-
- [SetUp]
- public override void SetUp()
- {
- base.SetUp();
- }
-
- [TearDown]
- public override void TearDown()
- {
- base.TearDown();
- }
-
- [Test]
- public override void SendAndSyncReceive()
- {
- base.SendAndSyncReceive();
- }
-
- protected override IMessage CreateMessage()
- {
- IBytesMessage request = Session.CreateBytesMessage(expected);
- return request;
- }
-
- protected override void AssertValidMessage(IMessage message)
- {
- Assert.IsTrue(message is IBytesMessage, "Did not receive a IBytesMessage: " + message);
-
- Console.WriteLine("Received IBytesMessage: " + message);
-
- IBytesMessage bytesMessage = (IBytesMessage) message;
- byte[] actual = bytesMessage.Content;
- Console.WriteLine("Received message with content: " + actual);
- Assert.AreEqual(expected, actual, "the message content");
- }
- }
+/*
+ * 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.
+ */
+using System;
+using NUnit.Framework;
+
+namespace NMS.Test
+{
+ [TestFixture]
+ public abstract class BytesMessageTest : NMSTestSupport
+ {
+ private byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8};
+
+ [SetUp]
+ public override void SetUp()
+ {
+ base.SetUp();
+ }
+
+ [TearDown]
+ public override void TearDown()
+ {
+ base.TearDown();
+ }
+
+ [Test]
+ public override void SendAndSyncReceive()
+ {
+ base.SendAndSyncReceive();
+ }
+
+ protected override IMessage CreateMessage()
+ {
+ IBytesMessage request = Session.CreateBytesMessage(expected);
+ return request;
+ }
+
+ protected override void AssertValidMessage(IMessage message)
+ {
+ Assert.IsTrue(message is IBytesMessage, "Did not receive a IBytesMessage: " + message);
+
+ Console.WriteLine("Received IBytesMessage: " + message);
+
+ IBytesMessage bytesMessage = (IBytesMessage) message;
+ byte[] actual = bytesMessage.Content;
+ Console.WriteLine("Received message with content: " + actual);
+ Assert.AreEqual(expected, actual, "the message content");
+ }
+ }
}
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/BytesMessageTest.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs Mon Oct 9 13:59:14 2006
@@ -1,27 +1,27 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.42
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-[assembly: ComVisibleAttribute(false)]
-[assembly: CLSCompliantAttribute(true)]
-[assembly: AssemblyTitleAttribute("Apache NMS Class Library Tests")]
-[assembly: AssemblyDescriptionAttribute("NMS (.Net Messaging Library) Unit Tests")]
-[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
-[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
-[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
-[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
-[assembly: AssemblyTrademarkAttribute("")]
-[assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("4.0")]
-[assembly: AssemblyInformationalVersionAttribute("4.0")]
-
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(true)]
+[assembly: AssemblyTitleAttribute("Apache NMS Class Library Tests")]
+[assembly: AssemblyDescriptionAttribute("NMS (.Net Messaging Library) Unit Tests")]
+[assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
+[assembly: AssemblyCompanyAttribute("http://incubator.apache.org/activemq/")]
+[assembly: AssemblyProductAttribute("Apache ActiveMQ")]
+[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
+[assembly: AssemblyTrademarkAttribute("")]
+[assembly: AssemblyCultureAttribute("")]
+[assembly: AssemblyVersionAttribute("4.0")]
+[assembly: AssemblyInformationalVersionAttribute("4.0")]
+
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/CommonAssemblyInfo.cs
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/ConsumerTest.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/ConsumerTest.cs?view=diff&rev=454506&r1=454505&r2=454506
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/ConsumerTest.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/ConsumerTest.cs Mon Oct 9 13:59:14 2006
@@ -1,94 +1,94 @@
-/*
- * 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.
- */
-using System;
-using NUnit.Framework;
-
-namespace NMS.Test
-{
- [TestFixture]
- public abstract class ConsumerTest : NMSTestSupport
- {
- public bool persistent;
- public int prefetch;
- public bool durableConsumer;
-
- [SetUp]
- public override void SetUp()
- {
- clientId = "test";
- base.SetUp();
- }
-
- [TearDown]
- public override void TearDown()
- {
- base.TearDown();
- }
-
-
- [Test]
- public void TestDurableConsumerSelectorChangePersistent()
- {
- destinationType = DestinationType.Topic;
- persistent = true;
- doTestDurableConsumerSelectorChange();
- }
-
- [Test]
- public void TestDurableConsumerSelectorChangeNonPersistent()
- {
- destinationType = DestinationType.Topic;
- persistent = true;
- doTestDurableConsumerSelectorChange();
- }
-
- public void doTestDurableConsumerSelectorChange()
- {
- IMessageProducer producer = Session.CreateProducer(Destination);
- producer.Persistent = persistent;
- IMessageConsumer consumer =
- Session.CreateDurableConsumer((ITopic) Destination, "test", "color='red'", false);
-
- // Send the messages
- ITextMessage message = Session.CreateTextMessage("1st");
- message.Properties["color"] = "red";
- producer.Send(message);
-
- IMessage m = consumer.Receive(TimeSpan.FromMilliseconds(receiveTimeout));
- Assert.IsNotNull(m);
- Assert.AreEqual("1st", ((ITextMessage) m).Text);
-
- // Change the subscription.
- consumer.Dispose();
- consumer = Session.CreateDurableConsumer((ITopic) Destination, "test", "color='blue'", false);
-
- message = Session.CreateTextMessage("2nd");
- message.Properties["color"] = "red";
- producer.Send(message);
- message = Session.CreateTextMessage("3rd");
- message.Properties["color"] = "blue";
- producer.Send(message);
-
- // Selector should skip the 2nd message.
- m = consumer.Receive(TimeSpan.FromMilliseconds(1000));
- Assert.IsNotNull(m);
- Assert.AreEqual("3rd", ((ITextMessage) m).Text);
-
- Assert.IsNull(consumer.ReceiveNoWait());
- }
- }
+/*
+ * 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.
+ */
+using System;
+using NUnit.Framework;
+
+namespace NMS.Test
+{
+ [TestFixture]
+ public abstract class ConsumerTest : NMSTestSupport
+ {
+ public bool persistent;
+ public int prefetch;
+ public bool durableConsumer;
+
+ [SetUp]
+ public override void SetUp()
+ {
+ clientId = "test";
+ base.SetUp();
+ }
+
+ [TearDown]
+ public override void TearDown()
+ {
+ base.TearDown();
+ }
+
+
+ [Test]
+ public void TestDurableConsumerSelectorChangePersistent()
+ {
+ destinationType = DestinationType.Topic;
+ persistent = true;
+ doTestDurableConsumerSelectorChange();
+ }
+
+ [Test]
+ public void TestDurableConsumerSelectorChangeNonPersistent()
+ {
+ destinationType = DestinationType.Topic;
+ persistent = true;
+ doTestDurableConsumerSelectorChange();
+ }
+
+ public void doTestDurableConsumerSelectorChange()
+ {
+ IMessageProducer producer = Session.CreateProducer(Destination);
+ producer.Persistent = persistent;
+ IMessageConsumer consumer =
+ Session.CreateDurableConsumer((ITopic) Destination, "test", "color='red'", false);
+
+ // Send the messages
+ ITextMessage message = Session.CreateTextMessage("1st");
+ message.Properties["color"] = "red";
+ producer.Send(message);
+
+ IMessage m = consumer.Receive(TimeSpan.FromMilliseconds(receiveTimeout));
+ Assert.IsNotNull(m);
+ Assert.AreEqual("1st", ((ITextMessage) m).Text);
+
+ // Change the subscription.
+ consumer.Dispose();
+ consumer = Session.CreateDurableConsumer((ITopic) Destination, "test", "color='blue'", false);
+
+ message = Session.CreateTextMessage("2nd");
+ message.Properties["color"] = "red";
+ producer.Send(message);
+ message = Session.CreateTextMessage("3rd");
+ message.Properties["color"] = "blue";
+ producer.Send(message);
+
+ // Selector should skip the 2nd message.
+ m = consumer.Receive(TimeSpan.FromMilliseconds(1000));
+ Assert.IsNotNull(m);
+ Assert.AreEqual("3rd", ((ITextMessage) m).Text);
+
+ Assert.IsNull(consumer.ReceiveNoWait());
+ }
+ }
}
Propchange: incubator/activemq/activemq-dotnet/trunk/src/test/csharp/NMS/Test/ConsumerTest.cs
------------------------------------------------------------------------------
svn:eol-style = native