blob: a2263f2911d13b95aede26966c56e03c20695a74 [file] [log] [blame]
Andrew Brown63bed362015-02-18 11:28:50 -08001/*
2 * File name: IntegrationSuite.java
3 *
4 * Purpose: Tests to run with a local NFD as part of integration testing; will
5 * not run in the maven test phase, must be run manually.
6 *
7 * © Copyright Intel Corporation. All rights reserved.
8 * Intel Corporation, 2200 Mission College Boulevard,
9 * Santa Clara, CA 95052-8119, USA
10 */
11package com.intel.jndn.management;
12
13import java.util.logging.Logger;
14import junit.framework.Assert;
15import net.named_data.jndn.Face;
16import net.named_data.jndn.Name;
17
18/**
19 * Tests to run with a local NFD as part of integration testing; will not run in
20 * the maven test phase, must be run manually.
21 *
22 * @author Andrew Brown <andrew.brown@intel.com>
23 */
24public class IntegrationSuite {
25
26 private static final Logger logger = Logger.getLogger(IntegrationSuite.class.getName());
27
28 public static void main(String[] args) throws Exception {
andrewsbrown458524b2015-02-23 09:10:13 -080029 Face face = new Face("localhost");
Andrew Brown63bed362015-02-18 11:28:50 -080030 Assert.assertTrue(NFD.pingLocal(face));
31
32 // grab datasets
33 Assert.assertFalse(NFD.getFaceList(face).isEmpty());
34 Assert.assertFalse(NFD.getFibList(face).isEmpty());
35 Assert.assertFalse(NFD.getRouteList(face).isEmpty());
36
37 // create a new route
38 Assert.assertTrue(NFD.register(face, "contentstore://", new Name("/my/cache/route"), 999));
39
40 // remove the route
41 Assert.assertTrue(NFD.unregister(face, new Name("/my/cache/route")));
42 }
43}