Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nelson Tavares de Sousa
TeeTime-Framework
Commits
4eb1511f
Commit
4eb1511f
authored
10 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
removed countLines and replaced by guava
parent
32c48cbc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/teetime/framework/pipe/PipeFactoryLoaderTest.java
+1
-16
1 addition, 16 deletions
...st/java/teetime/framework/pipe/PipeFactoryLoaderTest.java
with
1 addition
and
16 deletions
src/test/java/teetime/framework/pipe/PipeFactoryLoaderTest.java
+
1
−
16
View file @
4eb1511f
package
teetime.framework.pipe
;
package
teetime.framework.pipe
;
import
java.io.BufferedReader
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileReader
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -27,7 +25,7 @@ public class PipeFactoryLoaderTest {
...
@@ -27,7 +25,7 @@ public class PipeFactoryLoaderTest {
@Test
@Test
public
void
singleConfig
()
throws
IOException
{
public
void
singleConfig
()
throws
IOException
{
List
<
IPipeFactory
>
list
=
PipeFactoryLoader
.
loadPipeFactoriesFromClasspath
(
"pipe-factories.conf"
);
List
<
IPipeFactory
>
list
=
PipeFactoryLoader
.
loadPipeFactoriesFromClasspath
(
"pipe-factories.conf"
);
int
lines
=
this
.
count
Lines
(
new
File
(
"conf/pipe-factories.conf"
));
int
lines
=
Files
.
read
Lines
(
new
File
(
"conf/pipe-factories.conf"
)
,
Charsets
.
UTF_8
).
size
(
);
Assert
.
assertEquals
(
lines
,
list
.
size
());
Assert
.
assertEquals
(
lines
,
list
.
size
());
}
}
...
@@ -71,17 +69,4 @@ public class PipeFactoryLoaderTest {
...
@@ -71,17 +69,4 @@ public class PipeFactoryLoaderTest {
}
}
}
}
private
int
countLines
(
final
File
fileName
)
throws
IOException
{
BufferedReader
fileReader
=
new
BufferedReader
(
new
FileReader
(
fileName
));
int
lines
=
0
;
// NOPMD
try
{
while
(
fileReader
.
readLine
()
!=
null
)
{
// NOPMD
lines
=
lines
+
1
;
}
}
finally
{
fileReader
.
close
();
// NOPMD
}
return
lines
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment