Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ipgallery.common.java
/
utils
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
06092d89
authored
Aug 08, 2016
by
amir
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add tests
parent
96b469b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
src/test/java/TestConfiguration.java
src/test/java/TestNetwork.java
src/test/java/TestConfiguration.java
0 → 100644
View file @
06092d89
import
common.configuration.ConfigProperties
;
import
org.junit.Test
;
/**
* Created by amir on 08/08/16.
*/
public
class
TestConfiguration
{
@Test
public
void
testProperties
()
{
System
.
setProperty
(
"configFile.location"
,
"/opt/mcx/config/config.properties"
);
ConfigProperties
.
getInstance
().
reloadProperties
();
}
}
src/test/java/TestNetwork.java
0 → 100644
View file @
06092d89
import
org.junit.Test
;
import
java.net.InetAddress
;
/**
* Created by amir on 21/07/16.
*/
public
class
TestNetwork
{
@Test
public
void
testResolver
()
{
try
{
InetAddress
address
=
InetAddress
.
getByName
(
"gitlab"
);
boolean
isReachable
=
address
.
isReachable
(
2000
);
if
(
isReachable
)
System
.
out
.
println
(
"The address is reachable"
);
else
System
.
out
.
println
(
"The address is not reachable"
);
}
catch
(
Exception
exc
)
{
exc
.
printStackTrace
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment