Alexander Afanasyev | a8bc0d8 | 2016-01-25 17:25:30 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * jndn-management |
| 3 | * Copyright (c) 2015, Intel Corporation. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms and conditions of the GNU Lesser General Public License, |
| 7 | * version 3, as published by the Free Software Foundation. |
| 8 | * |
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT ANY |
| 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 11 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| 12 | * more details. |
| 13 | */ |
| 14 | package com.intel.jndn.management; |
| 15 | |
| 16 | import com.intel.jndn.management.enums.Strategies; |
| 17 | import com.intel.jndn.management.types.RibEntry; |
| 18 | import com.intel.jndn.management.types.StrategyChoice; |
| 19 | import com.intel.jndn.mock.MockKeyChain; |
| 20 | import net.named_data.jndn.Face; |
| 21 | import net.named_data.jndn.KeyLocator; |
| 22 | import net.named_data.jndn.Name; |
| 23 | import net.named_data.jndn.encoding.EncodingException; |
| 24 | import net.named_data.jndn.security.KeyChain; |
| 25 | import net.named_data.jndn.security.SecurityException; |
| 26 | import org.junit.Before; |
| 27 | import org.junit.Test; |
| 28 | |
| 29 | import java.io.IOException; |
| 30 | import java.util.List; |
| 31 | import java.util.Random; |
| 32 | import java.util.logging.Logger; |
| 33 | |
| 34 | import static junit.framework.Assert.assertEquals; |
| 35 | import static org.junit.Assert.*; |
| 36 | |
| 37 | /** |
| 38 | * Testing basic pining using real NFD instance (NFD must be run locally while executing the test) |
| 39 | * |
| 40 | * @author Andrew Brown <andrew.brown@intel.com> |
| 41 | */ |
| 42 | public class NdnPingClientIT { |
| 43 | private Face face; |
| 44 | |
| 45 | @Before |
| 46 | public void setUp() throws SecurityException { |
| 47 | face = new Face("localhost"); |
| 48 | } |
| 49 | |
| 50 | @Test |
| 51 | public void testPingLocal() throws IOException, ManagementException { |
| 52 | boolean hasSucceeded = NdnPingClient.pingLocal(face); |
| 53 | assertTrue(hasSucceeded); |
| 54 | } |
| 55 | } |