[jboss-cvs] JBoss Messaging SVN: r5800 - in branches/dotNetTest/dotnet: JBMClientTest and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 3 09:59:37 EST 2009


Author: clebert.suconic at jboss.com
Date: 2009-02-03 09:59:37 -0500 (Tue, 03 Feb 2009)
New Revision: 5800

Modified:
   branches/dotNetTest/dotnet/JBMClient/util/SimpleString.cs
   branches/dotNetTest/dotnet/JBMClientTest/JBMClientTest.csproj
   branches/dotNetTest/dotnet/JBMClientTest/util/SimpleStringTest.cs
Log:
Tweaks

Modified: branches/dotNetTest/dotnet/JBMClient/util/SimpleString.cs
===================================================================
--- branches/dotNetTest/dotnet/JBMClient/util/SimpleString.cs	2009-02-03 14:49:31 UTC (rev 5799)
+++ branches/dotNetTest/dotnet/JBMClient/util/SimpleString.cs	2009-02-03 14:59:37 UTC (rev 5800)
@@ -152,12 +152,19 @@
 
         // Public
         // ---------------------------------------------------------------------------
+
+		public byte[] Data
+		{
+			get
+			{
+				return this.data;
+			}
+			private set
+			{
+				this.data = value;
+			}
+		}
 
-        public byte[] GetData()
-        {
-            return data;
-        }
-
         public bool StartsWith(SimpleString other)
         {
             byte[] otherdata = other.data;
@@ -290,9 +297,9 @@
         public SimpleString Concat(SimpleString toAdd)
         {
 
-            byte[] bytes = new byte[data.Length + toAdd.GetData().Length];
+            byte[] bytes = new byte[data.Length + toAdd.Data.Length];
             Array.Copy(data, 0, bytes, 0, data.Length);
-            Array.Copy(toAdd.GetData(), 0, bytes, data.Length, toAdd.GetData().Length);
+            Array.Copy(toAdd.Data, 0, bytes, data.Length, toAdd.Data.Length);
             return new SimpleString(bytes);
         }
 

Modified: branches/dotNetTest/dotnet/JBMClientTest/JBMClientTest.csproj
===================================================================
--- branches/dotNetTest/dotnet/JBMClientTest/JBMClientTest.csproj	2009-02-03 14:49:31 UTC (rev 5799)
+++ branches/dotNetTest/dotnet/JBMClientTest/JBMClientTest.csproj	2009-02-03 14:59:37 UTC (rev 5800)
@@ -25,6 +25,11 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <OutputType>Library</OutputType>
+    <AssemblyName>JMSClientTest</AssemblyName>
+    <RootNamespace>JMSClientTest</RootNamespace>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -33,13 +38,19 @@
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <OutputType>Library</OutputType>
+    <AssemblyName>JMSClientTest</AssemblyName>
+    <DebugSymbols>true</DebugSymbols>
+    <RootNamespace>JMSClientTest</RootNamespace>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
     <Reference Include="System" />
     <Reference Include="System.Core">
       <RequiredTargetFramework>3.5</RequiredTargetFramework>
     </Reference>
+    <Reference Include="nunit.framework, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs" />
@@ -48,7 +59,7 @@
   </ItemGroup>
   <ItemGroup>
     <Content Include="AuthoringTests.txt" />
-   </ItemGroup>
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\JBMClient\JBMClient.csproj">
       <Project>{675AD929-BF42-4930-AC39-603D5EC52D58}</Project>

Modified: branches/dotNetTest/dotnet/JBMClientTest/util/SimpleStringTest.cs
===================================================================
--- branches/dotNetTest/dotnet/JBMClientTest/util/SimpleStringTest.cs	2009-02-03 14:49:31 UTC (rev 5799)
+++ branches/dotNetTest/dotnet/JBMClientTest/util/SimpleStringTest.cs	2009-02-03 14:59:37 UTC (rev 5800)
@@ -30,9 +30,9 @@
 
             assertEquals(str, s.ToString());
 
-            assertEquals(2 * str.Length, s.GetData().Length);
+            assertEquals(2 * str.Length, s.Data.Length);
 
-            byte[] data = s.GetData();
+            byte[] data = s.Data;
 
             SimpleString s2 = new SimpleString(data);
 
@@ -207,7 +207,7 @@
             String myString = "abcdef&^*&!^ghijkl\uB5E2\uCAC7\uB2BB\uB7DD\uB7C7\uB3A3\uBCE4\uB5A5";
 
             SimpleString s = new SimpleString(myString);
-            byte[] data = s.GetData();
+            byte[] data = s.Data;
             s = new SimpleString(data);
 
             assertEquals(myString, s.ToString());
@@ -219,7 +219,7 @@
             String myString = "abcdef&^*&!^ghijkl\uD900\uDD00";
 
             SimpleString s = new SimpleString(myString);
-            byte[] data = s.GetData();
+            byte[] data = s.Data;
             s = new SimpleString(data);
 
             assertEquals(myString, s.ToString());
@@ -232,7 +232,7 @@
 
             //FIXME: provide a randomString method
             SimpleString str = new SimpleString(randomString());
-            assertEquals(DataConstants.SIZE_INT + str.GetData().Length, SimpleString.SizeofString(str));
+            assertEquals(DataConstants.SIZE_INT + str.Data.Length, SimpleString.SizeofString(str));
         }
 
         [Test]
@@ -243,7 +243,7 @@
             assertEquals(1 + DataConstants.SIZE_INT, SimpleString.SizeofNullableString(new SimpleString("")));
 
             SimpleString str = new SimpleString(randomString());
-            assertEquals(1 + DataConstants.SIZE_INT + str.GetData().Length, SimpleString.SizeofNullableString(str));
+            assertEquals(1 + DataConstants.SIZE_INT + str.Data.Length, SimpleString.SizeofNullableString(str));
         }
 
         [Test]




More information about the jboss-cvs-commits mailing list