jndn-mock

Tools for testing NDN Java code without using network IO.

License

License

GroupId

GroupId

com.intel.jndn.mock
ArtifactId

ArtifactId

jndn-mock
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

jndn-mock
Tools for testing NDN Java code without using network IO.
Project URL

Project URL

https://github.com/01org/jndn-utils
Source Code Management

Source Code Management

https://github.com/01org/jndn-mock

Download jndn-mock

How to add to project

<!-- https://jarcasting.com/artifacts/com.intel.jndn.mock/jndn-mock/ -->
<dependency>
    <groupId>com.intel.jndn.mock</groupId>
    <artifactId>jndn-mock</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.intel.jndn.mock/jndn-mock/
implementation 'com.intel.jndn.mock:jndn-mock:1.1.0'
// https://jarcasting.com/artifacts/com.intel.jndn.mock/jndn-mock/
implementation ("com.intel.jndn.mock:jndn-mock:1.1.0")
'com.intel.jndn.mock:jndn-mock:jar:1.1.0'
<dependency org="com.intel.jndn.mock" name="jndn-mock" rev="1.1.0">
  <artifact name="jndn-mock" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.intel.jndn.mock', module='jndn-mock', version='1.1.0')
)
libraryDependencies += "com.intel.jndn.mock" % "jndn-mock" % "1.1.0"
[com.intel.jndn.mock/jndn-mock "1.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
net.named-data : jndn jar 0.13

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

jndn-mock

This project consists of tools for testing NDN applications without network IO. It relies on the NDN Protocol and its associated client library.

Install

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>

Use

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());

License

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.

com.intel.jndn.mock

01org

Intel Open Source Technology Center

Versions

Version
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
0.11.1
0.11.0
0.10.2
0.10.1
0.10.0
0.9.7
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2