blob: 137d1b4759975c8b57ad55f6722b02ec7d286590 [file] [log] [blame]
/*
* jndn-mock
* Copyright (c) 2015, Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU Lesser General Public License,
* version 3, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
* more details.
*/
package com.intel.jndn.mock;
import net.named_data.jndn.Name;
import net.named_data.jndn.security.KeyChain;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Test MockKeyChain
* @author Andrew Brown <andrew.brown@intel.com>
*/
public class MockKeyChainTest {
/**
* Test of configure method, of class MockKeyChain.
*/
@Test
public void testConfigure() throws Exception {
String identity = "/test/name";
KeyChain keyChain = MockKeyChain.configure(new Name(identity));
assertEquals(identity, keyChain.getDefaultIdentity().toUri());
assertTrue(keyChain.getDefaultCertificateName().toUri().startsWith(identity));
}
}