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 | |
Alexander Afanasyev | a8bc0d8 | 2016-01-25 17:25:30 -0800 | [diff] [blame] | 16 | import net.named_data.jndn.Face; |
Alexander Afanasyev | a8bc0d8 | 2016-01-25 17:25:30 -0800 | [diff] [blame] | 17 | import net.named_data.jndn.security.SecurityException; |
| 18 | import org.junit.Before; |
| 19 | import org.junit.Test; |
| 20 | |
| 21 | import java.io.IOException; |
Alexander Afanasyev | a8bc0d8 | 2016-01-25 17:25:30 -0800 | [diff] [blame] | 22 | |
Alexander Afanasyev | e36e1af | 2016-02-19 18:06:05 -0800 | [diff] [blame^] | 23 | import static org.junit.Assert.assertTrue; |
Alexander Afanasyev | a8bc0d8 | 2016-01-25 17:25:30 -0800 | [diff] [blame] | 24 | |
| 25 | /** |
Alexander Afanasyev | e36e1af | 2016-02-19 18:06:05 -0800 | [diff] [blame^] | 26 | * Testing basic pining using real NFD instance (NFD must be run locally while executing the test). |
Alexander Afanasyev | a8bc0d8 | 2016-01-25 17:25:30 -0800 | [diff] [blame] | 27 | * |
| 28 | * @author Andrew Brown <andrew.brown@intel.com> |
| 29 | */ |
| 30 | public class NdnPingClientIT { |
| 31 | private Face face; |
| 32 | |
| 33 | @Before |
| 34 | public void setUp() throws SecurityException { |
| 35 | face = new Face("localhost"); |
| 36 | } |
| 37 | |
| 38 | @Test |
| 39 | public void testPingLocal() throws IOException, ManagementException { |
| 40 | boolean hasSucceeded = NdnPingClient.pingLocal(face); |
| 41 | assertTrue(hasSucceeded); |
| 42 | } |
| 43 | } |