blob: a599ae946eeb8772cf126e9b4cce385d6c289953 [file] [log] [blame]
andrewsbrownaada3932015-04-01 14:09:51 -07001/*
2 * jndn-mock
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.mock;
15
16import net.named_data.jndn.Name;
17import net.named_data.jndn.security.KeyChain;
18import org.junit.Test;
19import static org.junit.Assert.*;
20
21/**
22 * Test MockKeyChain
Andrew Brown58191872016-02-05 22:16:57 -080023 *
andrewsbrownaada3932015-04-01 14:09:51 -070024 * @author Andrew Brown <andrew.brown@intel.com>
25 */
26public class MockKeyChainTest {
27
28 /**
29 * Test of configure method, of class MockKeyChain.
30 */
31 @Test
32 public void testConfigure() throws Exception {
33 String identity = "/test/name";
34 KeyChain keyChain = MockKeyChain.configure(new Name(identity));
35 assertEquals(identity, keyChain.getDefaultIdentity().toUri());
36 assertTrue(keyChain.getDefaultCertificateName().toUri().startsWith(identity));
37 }
38}