Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #252 from sbtqa/feature/array-delimiter-in-properties
Browse files Browse the repository at this point in the history
Feature/array delimiter in properties
  • Loading branch information
clicman authored May 24, 2019
2 parents f3d5b0d + a329fa2 commit f60700d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public static TestDataProvider getDataProvider() throws DataException {
testDataProvider = initProvider(PROVIDERS.PROPERTIES_DATA_PROVIDER,
dataFolder,
initialCollection,
(dataExtension.equals("")) ? "properties" : dataExtension
(dataExtension.equals("")) ? "properties" : dataExtension,
PROPERTIES.getDataArrayDelimiter()
);
break;
case "excel":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public interface Configuration extends Config {
@DefaultValue("")
String getDataDb();

@Key("data.arrayDelimiter")
@DefaultValue(",")
String getDataArrayDelimiter();


@Key("junit.lang")
@DefaultValue("ru")
Expand Down
7 changes: 7 additions & 0 deletions page-factory-doc/src/main/asciidoc/cucumber_data.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ data.uri = mongodb://username:password@host.ru:8080
data.db = bd
----

====== Особенности работы `properties`
Для `properties` файлов доступен функционал раскладывания значения на массив по разделителю. По-умолчанию это `,`, но можно переопределить следующим образом:
[source,]
----
data.arrayDelimiter = !
----

====== Путь к элементу коллекции
Для обозначения пути внутри коллекции используются фигурные скобки

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<tag.version.qautils>1.5.0</tag.version.qautils>
<tag.version.videorecorder>1.0.7</tag.version.videorecorder>
<tag.version.webdrivermanager>2.2.2</tag.version.webdrivermanager>
<tag.version.datajack>5.0.0</tag.version.datajack>
<tag.version.datajack>5.0.1</tag.version.datajack>
<allure.version>2.10.0</allure.version>
</properties>

Expand Down

0 comments on commit f60700d

Please sign in to comment.