directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r953749 - /directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/
Date Fri, 11 Jun 2010 16:05:30 GMT
Author: felixk
Date: Fri Jun 11 16:05:30 2010
New Revision: 953749

URL: http://svn.apache.org/viewvc?rev=953749&view=rev
Log:
Add type safety, but there are not test in here?

Modified:
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java
    directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -100,7 +100,7 @@ public abstract class AbstractResourceRe
      * @return the attributes to be used as the resource data for the resource
      *         record
      */
-    protected abstract Map getAttributes();
+    protected abstract Map<String, Object> getAttributes();
 
 
     /**

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -40,6 +40,7 @@ public class AddressRecordEncoderTest ex
     InetAddress address;
 
 
+    @Override
     protected void setUpResourceData()
     {
         try
@@ -53,20 +54,23 @@ public class AddressRecordEncoderTest ex
     }
 
 
-    protected Map getAttributes()
+    @Override
+    protected Map<String, Object> getAttributes()
     {
-        Map attributes = new HashMap();
+        Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put( DnsAttribute.IP_ADDRESS, address );
         return attributes;
     }
 
 
+    @Override
     protected ResourceRecordEncoder getEncoder()
     {
         return new AddressRecordEncoder();
     }
 
 
+    @Override
     protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) address.getAddress().length );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -59,20 +59,23 @@ public class CanonicalNameRecordEncoderT
     String[] cnameParts = cname.split( "\\." );
 
 
-    protected Map getAttributes()
+    @Override
+    protected Map<String, Object> getAttributes()
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( DnsAttribute.DOMAIN_NAME.toLowerCase(), cname );
         return map;
     }
 
 
+    @Override
     protected ResourceRecordEncoder getEncoder()
     {
         return new CanonicalNameRecordEncoder();
     }
 
 
+    @Override
     protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 18 );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -40,21 +40,24 @@ public class MailExchangeRecordEncoderTe
     String[] mxParts = mxHost.split( "\\." );
 
 
-    protected Map getAttributes()
+    @Override
+    protected Map<String, Object> getAttributes()
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( DnsAttribute.MX_PREFERENCE.toLowerCase(), mxPreference );
         map.put( DnsAttribute.DOMAIN_NAME.toLowerCase(), mxHost );
         return map;
     }
 
 
+    @Override
     protected ResourceRecordEncoder getEncoder()
     {
         return new MailExchangeRecordEncoder();
     }
 
 
+    @Override
     protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 20 );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -39,20 +39,23 @@ public class NameServerRecordEncoderTest
     String[] nsParts = nsName.split( "\\." );
 
 
-    protected Map getAttributes()
+    @Override
+    protected Map<String, Object> getAttributes()
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( DnsAttribute.DOMAIN_NAME.toLowerCase(), nsName );
         return map;
     }
 
 
+    @Override
     protected ResourceRecordEncoder getEncoder()
     {
         return new NameServerRecordEncoder();
     }
 
 
+    @Override
     protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 19 );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -39,20 +39,23 @@ public class PointerRecordEncoderTest ex
     String[] ptrParts = ptrName.split( "\\." );
 
 
-    protected Map getAttributes()
+    @Override
+    protected Map<String, Object> getAttributes()
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( DnsAttribute.DOMAIN_NAME.toLowerCase(), ptrName );
         return map;
     }
 
 
+    @Override
     protected ResourceRecordEncoder getEncoder()
     {
         return new PointerRecordEncoder();
     }
 
 
+    @Override
     protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 15 );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -43,9 +43,9 @@ public class ServerSelectionRecordEncode
 
 
     @Override
-    protected Map getAttributes()
+    protected Map<String, Object> getAttributes()
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( DnsAttribute.SERVICE_PRIORITY.toLowerCase(), priority );
         map.put( DnsAttribute.SERVICE_WEIGHT.toLowerCase(), weight );
         map.put( DnsAttribute.SERVICE_PORT.toLowerCase(), port );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -46,9 +46,10 @@ public class StartOfAuthorityRecordEncod
     String minimum = "3600";
 
 
-    protected Map getAttributes()
+    @Override
+    protected Map<String, Object> getAttributes()
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( DnsAttribute.SOA_M_NAME.toLowerCase(), mName );
         map.put( DnsAttribute.SOA_R_NAME.toLowerCase(), rName );
         map.put( DnsAttribute.SOA_SERIAL.toLowerCase(), serial );
@@ -60,12 +61,14 @@ public class StartOfAuthorityRecordEncod
     }
 
 
+    @Override
     protected ResourceRecordEncoder getEncoder()
     {
         return new StartOfAuthorityRecordEncoder();
     }
 
 
+    @Override
     protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 60 ); // 1 + 18 + 1 + 20 + 4 + 4 + 4 + 4 + 4

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java?rev=953749&r1=953748&r2=953749&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java
Fri Jun 11 16:05:30 2010
@@ -38,20 +38,23 @@ public class TextRecordEncoderTest exten
     String characterString = "This is a string";
 
 
-    protected Map getAttributes()
+    @Override
+    protected Map<String, Object> getAttributes()
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( DnsAttribute.CHARACTER_STRING.toLowerCase(), characterString );
         return map;
     }
 
 
+    @Override
     protected ResourceRecordEncoder getEncoder()
     {
         return new TextRecordEncoder();
     }
 
 
+    @Override
     protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) ( characterString.length() + 1 ) );



Mime
View raw message