Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
673c5993
Kaydet (Commit)
673c5993
authored
Ara 22, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
java: simplify command-line parameter parsing in ClParser
Change-Id: I37790675619b2dde3fe303ba3adc527fc1dfdcf5
üst
37d36d6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
27 deletions
+22
-27
ClParser.java
qadevOOo/runner/helper/ClParser.java
+22
-27
No files found.
qadevOOo/runner/helper/ClParser.java
Dosyayı görüntüle @
673c5993
...
...
@@ -18,7 +18,7 @@
package
helper
;
import
java.io.File
;
import
java.util.
Properties
;
import
java.util.
HashMap
;
import
lib.TestParameters
;
import
util.PropertyName
;
...
...
@@ -36,11 +36,9 @@ public class ClParser
public
void
getCommandLineParameter
(
TestParameters
param
,
String
[]
args
)
{
Properties
mapping
=
getMapping
();
for
(
int
i
=
0
;
i
<
args
.
length
;)
{
String
pName
=
getParameterFor
(
mapping
,
args
[
i
]).
trim
();
String
pName
=
getParameterFor
(
args
[
i
]).
trim
();
String
pValue
=
""
;
if
(
pName
.
equals
(
"TestJob"
))
{
...
...
@@ -145,33 +143,30 @@ public class ClParser
return
iniFile
;
}
/*
*
This method maps command
line Parameters to TestParameters
/*
*
*
Map command-
line Parameters to TestParameters
*/
private
Properties
getMapping
()
{
Properties
map
=
new
Properties
();
map
.
setProperty
(
"-cs"
,
"ConnectionString"
);
map
.
setProperty
(
"-tb"
,
"TestBase"
);
map
.
setProperty
(
"-tdoc"
,
"TestDocumentPath"
);
map
.
setProperty
(
"-objdsc"
,
"DescriptionPath"
);
map
.
setProperty
(
"-cmd"
,
"AppExecutionCommand"
);
map
.
setProperty
(
"-o"
,
"TestJob"
);
map
.
setProperty
(
"-sce"
,
"TestJob"
);
map
.
setProperty
(
"-p"
,
"TestJob"
);
map
.
setProperty
(
"-aca"
,
"AdditionalConnectionArguments"
);
map
.
setProperty
(
"-xcl"
,
"ExclusionList"
);
map
.
setProperty
(
"-debug"
,
"DebugIsActive"
);
map
.
setProperty
(
"-log"
,
"LoggingIsActive"
);
map
.
setProperty
(
"-dbout"
,
"DataBaseOut"
);
map
.
setProperty
(
"-nca"
,
"NoCwsAttach"
);
return
map
;
private
static
final
java
.
util
.
Map
<
String
,
String
>
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
=
new
HashMap
<
String
,
String
>();
static
{
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-cs"
,
"ConnectionString"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-tb"
,
"TestBase"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-tdoc"
,
"TestDocumentPath"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-objdsc"
,
"DescriptionPath"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-cmd"
,
"AppExecutionCommand"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-o"
,
"TestJob"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-sce"
,
"TestJob"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-p"
,
"TestJob"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-aca"
,
"AdditionalConnectionArguments"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-xcl"
,
"ExclusionList"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-debug"
,
"DebugIsActive"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-log"
,
"LoggingIsActive"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-dbout"
,
"DataBaseOut"
);
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
put
(
"-nca"
,
"NoCwsAttach"
);
}
private
String
getParameterFor
(
Properties
map
,
String
name
)
private
String
getParameterFor
(
String
name
)
{
String
ret
=
map
.
getProperty
(
name
);
String
ret
=
COMMAND_LINE_OPTION_TO_TEST_PARAMETER
.
get
(
name
);
if
(
ret
==
null
)
{
...
...
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