From 22094368c2865dcfb6daf8366425212b721a4657 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 05 Feb 2009 17:42:14 +0000
Subject: [PATCH] Merge ASN1 branch to trunk
---
opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java | 49 -------------------------------------------------
1 files changed, 0 insertions(+), 49 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java
index 4fccf12..1c976db 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/LdapTestCase.java
@@ -35,10 +35,6 @@
import org.opends.server.admin.std.meta.LDAPConnectionHandlerCfgDefn;
import org.opends.server.admin.std.server.LDAPConnectionHandlerCfg;
import org.opends.server.config.ConfigException;
-import org.opends.server.protocols.asn1.ASN1Boolean;
-import org.opends.server.protocols.asn1.ASN1Element;
-import org.opends.server.protocols.asn1.ASN1Long;
-import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.Attribute;
import org.testng.annotations.Test;
@@ -95,51 +91,6 @@
}
/**
- * Generate an exception by writing a long into a integer element.
- * @param op The op.
- * @param type The type of sequence.
- * @param index The index into the element to write to.
- * @throws Exception If the protocol op decode can't write the sequence.
- */
- static void
- badIntegerElement(ProtocolOp op, byte type, int index) throws Exception {
- ASN1Element element = op.encode();
- ArrayList<ASN1Element> elements = ((ASN1Sequence)element).elements();
- elements.set(index, new ASN1Long(Long.MAX_VALUE));
- ProtocolOp.decode(new ASN1Sequence(type, elements));
- }
-
- /**
- * Generate an exception by adding an element.
- * @param op The op.
- * @param type The type of sequence.
- * @throws Exception If the protocol op decode has too many elements.
- */
- static void
- tooManyElements(ProtocolOp op, byte type) throws Exception
- {
- ASN1Element element = op.encode();
- ArrayList<ASN1Element> elements = ((ASN1Sequence)element).elements();
- elements.add(new ASN1Boolean(true));
- ProtocolOp.decode(new ASN1Sequence(type, elements));
- }
-
- /**
- * Generate an exception by removing an element.
- * @param op The op.
- * @param type The type of sequence.
- * @throws Exception If the protocol op decode has too few elements.
- */
- static void
- tooFewElements(ProtocolOp op, byte type) throws Exception
- {
- ASN1Element element = op.encode();
- ArrayList<ASN1Element> elements = ((ASN1Sequence)element).elements();
- elements.remove(0);
- ProtocolOp.decode(new ASN1Sequence(type, elements));
- }
-
- /**
* Test toString methods.
* @param op The op.
* @throws Exception If the toString method fails.
--
Gitblit v1.10.0