commit | c9ba550f6e21635b599073923d71ee381d3e1703 | [log] [tgz] |
---|---|---|
author | Andrew Brown <andrew.brown@intel.com> | Thu Aug 25 09:40:53 2016 -0700 |
committer | Andrew Brown <andrew.brown@intel.com> | Mon Aug 29 10:30:08 2016 -0700 |
tree | 347d4605f1ec4ef78f40caf7cd7d8a09d9ba7c09 | |
parent | 4b28865659a95cde414777c4a662713a5d1d9c7d [diff] |
Fix code style issues Fix e-mails in JavaDoc Fix visibility warnings in MockForwarder Add test ensuring public methods should be public. Simplify logic of PitImpl Remove redundant code: unused imports, unnecessary casts Bump gradle version Fix code analysis issues Disable checkstyle code analysis; TODO configure to IntelliJ-style settings and re-enable Add new logging statements
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
is a test tool that can be passed to applications instead of a network IO Face
; management of the Face.processEvents()
is still the user's responsibility, though this may change in a future release. For example:
Face face = new MockFace(); face.expressInterest(interest, onData, onTimeout); face.processEvents();
When using the MockFace
, retrieve statistics about sent/received Interests and Data packets like:
MockFace face = new MockFace(); assertEquals(0, face.sentDatas.size()); assertEquals(0, face.sentInterests.size()); face.expressInterest(interest, onData, onTimeout); ... face.processEvents(); ... assertEquals(1, face.sentInterests.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.