blob: b561b6e0e820e7546115d1d70bb204828d312be4 [file] [log] [blame]
Alexander Afanasyeva8bc0d82016-01-25 17:25:30 -08001/*
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 */
14package com.intel.jndn.management;
15
16import com.intel.jndn.management.enums.Strategies;
17import com.intel.jndn.management.types.RibEntry;
18import com.intel.jndn.management.types.StrategyChoice;
19import com.intel.jndn.mock.MockKeyChain;
20import net.named_data.jndn.Face;
21import net.named_data.jndn.KeyLocator;
22import net.named_data.jndn.Name;
23import net.named_data.jndn.encoding.EncodingException;
24import net.named_data.jndn.security.KeyChain;
25import net.named_data.jndn.security.SecurityException;
26import org.junit.Before;
27import org.junit.Test;
28
29import java.io.IOException;
30import java.util.List;
31import java.util.Random;
32import java.util.logging.Logger;
33
34import static junit.framework.Assert.assertEquals;
35import 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 */
42public 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}