Update list of known strategies and other management protocol constants
Change-Id: I0cf27a2686c26a0bf22242c829ca50b3b8d62c81
diff --git a/src/test/java/com/intel/jndn/management/NfdcIT.java b/src/test/java/com/intel/jndn/management/NfdcIT.java
index f1deef1..3b0973d 100644
--- a/src/test/java/com/intel/jndn/management/NfdcIT.java
+++ b/src/test/java/com/intel/jndn/management/NfdcIT.java
@@ -173,18 +173,17 @@
Nfdc.unregister(face, new Name("/my/test/route"), "udp4://127.0.0.1:56363");
}
- // TODO: restore after fixed bug in MockFace
-// @Test
-// public void testFailOfRegister() throws Exception {
-// exception.expect(ManagementException.class);
-// Nfdc.register(mockFace, new Name("/my/route/to/app/face"), 333);
-// }
-//
-// @Test
-// public void testFailOfUnregister() throws Exception {
-// exception.expect(ManagementException.class);
-// Nfdc.unregister(mockFace, new Name("/my/route/to/app/face"));
-// }
+ @Test
+ public void testFailOfRegister() throws Exception {
+ exception.expect(ManagementException.class);
+ Nfdc.register(mockFace, new Name("/my/route/to/app/face"), 333);
+ }
+
+ @Test
+ public void testFailOfUnregister() throws Exception {
+ exception.expect(ManagementException.class);
+ Nfdc.unregister(mockFace, new Name("/my/route/to/app/face"));
+ }
@Test
public void testFailOfCreateFace() throws Exception {
@@ -205,7 +204,7 @@
List<StrategyChoice> choices = Nfdc.getStrategyList(face);
int oldSize = choices.size();
- Nfdc.setStrategy(face, prefix, Strategies.CLIENT_CONTROL);
+ Nfdc.setStrategy(face, prefix, Strategies.RANDOM);
Thread.sleep(1000); // strategy takes a while to register
choices = Nfdc.getStrategyList(face);
@@ -252,7 +251,7 @@
}
}
});
- Nfdc.setStrategy(mockFace, new Name("/"), Strategies.BROADCAST);
+ Nfdc.setStrategy(mockFace, new Name("/"), Strategies.MULTICAST);
}
@Test
diff --git a/src/test/java/com/intel/jndn/management/types/ForwarderStatusTest.java b/src/test/java/com/intel/jndn/management/types/ForwarderStatusTest.java
index cc2eafe..6a12d4b 100644
--- a/src/test/java/com/intel/jndn/management/types/ForwarderStatusTest.java
+++ b/src/test/java/com/intel/jndn/management/types/ForwarderStatusTest.java
@@ -13,14 +13,15 @@
*/
package com.intel.jndn.management.types;
-import java.nio.ByteBuffer;
-
import com.intel.jndn.management.TestHelper;
import net.named_data.jndn.encoding.EncodingException;
-import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
+import java.nio.ByteBuffer;
+
+import static org.junit.Assert.assertEquals;
+
/**
* Test encoding/decoding of ForwarderStatus.
*
diff --git a/src/test/java/com/intel/jndn/management/types/StrategyChoiceTest.java b/src/test/java/com/intel/jndn/management/types/StrategyChoiceTest.java
index 1940b41..47667a1 100644
--- a/src/test/java/com/intel/jndn/management/types/StrategyChoiceTest.java
+++ b/src/test/java/com/intel/jndn/management/types/StrategyChoiceTest.java
@@ -11,9 +11,9 @@
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*/
-package com.intel.jndn.management;
+package com.intel.jndn.management.types;
-import com.intel.jndn.management.types.StrategyChoice;
+import com.intel.jndn.management.TestHelper;
import net.named_data.jndn.Name;
import net.named_data.jndn.encoding.EncodingException;
import org.junit.Before;