Andrew Brown | 63bed36 | 2015-02-18 11:28:50 -0800 | [diff] [blame] | 1 | /* |
| 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 | */ |
| 11 | package com.intel.jndn.management; |
| 12 | |
| 13 | import java.util.logging.Logger; |
| 14 | import junit.framework.Assert; |
| 15 | import net.named_data.jndn.Face; |
| 16 | import 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 | */ |
| 24 | public class IntegrationSuite { |
| 25 | |
| 26 | private static final Logger logger = Logger.getLogger(IntegrationSuite.class.getName()); |
| 27 | |
| 28 | public static void main(String[] args) throws Exception { |
andrewsbrown | 458524b | 2015-02-23 09:10:13 -0800 | [diff] [blame^] | 29 | Face face = new Face("localhost"); |
Andrew Brown | 63bed36 | 2015-02-18 11:28:50 -0800 | [diff] [blame] | 30 | 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 | } |