commit | aada3939b1e36361627ace3984c0005401ef7157 | [log] [tgz] |
---|---|---|
author | andrewsbrown <andrew.brown@intel.com> | Wed Apr 01 14:09:51 2015 -0700 |
committer | andrewsbrown <andrew.brown@intel.com> | Wed Apr 01 14:09:51 2015 -0700 |
tree | 88cd55ed7bb301d099bcf43add5d741a1baf4756 | |
parent | ebb72a875c356da834a3d5f2225713b8097d0cf6 [diff] |
Add ability to create an in-memory test key chain
This project consists of tools for testing NDN applications without network IO. It relies on the NDN Protocol and its associated client library.
With Maven, add the following to your POM:
<dependency> <groupId>com.intel.jndn.mock</groupId> <artifactId>jndn-mock</artifactId> <version>RELEASE</version> <!-- or a specific version --> </dependency>
MockFace
and MockTransport
are test tools that can be passed to applications instead of the typical Face
and Transport
. For example:
MockTransport transport = new MockTransport(); MockFace face = new MockFace(transport, null); application.doSomethingOn(face); assertEquals(0, transport.getSentDataPackets().size()); assertEquals(1, transport.getSentInterestPackets().size());
Copyright © 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.