Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
Add Junit to v3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericBregier committed Jul 22, 2019
1 parent e1253b8 commit e6cb0b4
Show file tree
Hide file tree
Showing 17 changed files with 2,038 additions and 649 deletions.
65 changes: 62 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ local.properties
.settings/
.loadpath
.pmd
bin/

# External tool builders
.externalToolBuilders/
Expand All @@ -33,9 +32,31 @@ bin/
#################
## Java
#################
# Compiled class file
*.class
*.jardesc

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

#################
## Visual Studio
#################
Expand Down Expand Up @@ -133,5 +154,43 @@ Thumbs.db
Desktop.ini

runtime.properties
/dummyBootCounter.agent
/dummyConf.agent

###############
## Intellij
###############
# User-specific stuff
.idea/

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

*.log

14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>WaarpSnmp</artifactId>
<version>3.0.7</version>
<version>3.1.0</version>
<name>WaarpSnmp</name>
<description>Waarp SNMP support through SNMP4J</description>
<url>http://waarp.github.com/WaarpSnmp</url>
Expand Down Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>Waarp</groupId>
<artifactId>WaarpCommon</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
Expand All @@ -73,7 +73,13 @@
<dependency>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j-agent</artifactId>
<version>2.6.4</version>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
Expand Down Expand Up @@ -102,7 +108,7 @@
<source>1.6</source>
<target>1.6</target>
<optimize>true</optimize>
<showDeprecations>true</showDeprecations>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
Expand Down
2 changes: 0 additions & 2 deletions src/main/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/org/waarp/snmp/utils/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** Provides the version information of Waarp SNMP */
public final class Version {
/** The version identifier. */
public static final String ID = "3.0.7";
public static final String ID = "3.1.0";
/** Prints out the version identifier to stdout. */
public static void main(String[] args) { System.out.println(ID); }
private Version() { super(); }
Expand Down
Empty file added src/test/java/.gitkeep
Empty file.
63 changes: 63 additions & 0 deletions src/test/java/org/waarp/snmp/test/ExampleImplCounter32.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*******************************************************************************
* This file is part of Waarp Project (named also Waarp or GG).
*
* Copyright (c) 2019, Waarp SAS, and individual contributors by the @author
* tags. See the COPYRIGHT.txt in the distribution for a full listing of
* individual contributors.
*
* All Waarp Project is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Waarp is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* Waarp . If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package org.waarp.snmp.test;

import org.snmp4j.smi.OID;
import org.waarp.snmp.interf.WaarpCounter32;

/**
* Example of WaarpGauge32 Usage
*
* @author Frederic Bregier
*/
@SuppressWarnings("serial")
public class ExampleImplCounter32 extends WaarpCounter32 {
public static final long STARTUP = 42;

public OID oid;

long _internalValue = STARTUP;

/**
*
*/
public ExampleImplCounter32(OID oid) {
super();
this.oid = oid;
}

/**
*
*/
public ExampleImplCounter32(OID oid, long value) {
super(value);
this.oid = oid;
}

protected void setInternalValue() {
_internalValue++;
setValue(_internalValue);
}

protected void setInternalValue(long value) {
_internalValue = value;
setValue(_internalValue);
}
}
101 changes: 51 additions & 50 deletions src/test/java/org/waarp/snmp/test/ExampleImplGauge32.java
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
/**
* This file is part of Waarp Project.
*
* Copyright 2009, Frederic Bregier, and individual contributors by the @author
* tags. See the COPYRIGHT.txt in the distribution for a full listing of
* individual contributors.
*
* All Waarp Project is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Waarp is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* Waarp. If not, see <http://www.gnu.org/licenses/>.
*/
/*******************************************************************************
* This file is part of Waarp Project (named also Waarp or GG).
*
* Copyright (c) 2019, Waarp SAS, and individual contributors by the @author
* tags. See the COPYRIGHT.txt in the distribution for a full listing of
* individual contributors.
*
* All Waarp Project is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Waarp is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* Waarp . If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package org.waarp.snmp.test;

import org.snmp4j.smi.OID;
import org.waarp.snmp.interf.WaarpGauge32;

/**
* Example of WaarpGauge32 Usage
*
*
* @author Frederic Bregier
*
*/
@SuppressWarnings("serial")
public class ExampleImplGauge32 extends WaarpGauge32 {
public OID oid;

long _internalValue = 42;

protected void setInternalValue() {
_internalValue++;
setValue(_internalValue);
}

protected void setInternalValue(long value) {
_internalValue = value;
setValue(_internalValue);
}

/**
*
*/
public ExampleImplGauge32(OID oid) {
super();
this.oid = oid;
}

/**
*
*/
public ExampleImplGauge32(OID oid, long value) {
super(value);
this.oid = oid;
}
public static final long STARTUP = 42;

public OID oid;

long _internalValue = STARTUP;

/**
*
*/
public ExampleImplGauge32(OID oid) {
super();
this.oid = oid;
}

/**
*
*/
public ExampleImplGauge32(OID oid, long value) {
super(value);
this.oid = oid;
}

protected void setInternalValue() {
_internalValue++;
setValue(_internalValue);
}

protected void setInternalValue(long value) {
_internalValue = value;
setValue(_internalValue);
}
}
Loading

0 comments on commit e6cb0b4

Please sign in to comment.