Add one small test to get Method coverage to 100%
diff --git a/test/com/google/enterprise/adaptor/ad/AdServerTest.java b/test/com/google/enterprise/adaptor/ad/AdServerTest.java
index b80a81a..0d95a6c 100644
--- a/test/com/google/enterprise/adaptor/ad/AdServerTest.java
+++ b/test/com/google/enterprise/adaptor/ad/AdServerTest.java
@@ -80,12 +80,19 @@
}
@Test
- public void testPublicConstructor() {
+ public void testPublicSSLConstructor() {
thrown.expect(AssertionError.class);
AdServer adServer = new AdServer(Method.SSL, "localhost", 389, " ", " ");
}
@Test
+ public void testPublicStandardConstructor() {
+ thrown.expect(AssertionError.class);
+ AdServer adServer =
+ new AdServer(Method.STANDARD, "localhost", 389, " ", " ");
+ }
+
+ @Test
public void testStandardServerInitialize() throws Exception {
MockLdapContext ldapContext = new MockLdapContext();
addStandardKeysAndResults(ldapContext);
@@ -408,7 +415,7 @@
byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) {
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
- + Character.digit(s.charAt(i+1), 16));
+ + Character.digit(s.charAt(i + 1), 16));
}
return data;
}