Skip to content

Custom string substitutors functionality#108

Open
drapostolos wants to merge 1 commit intomatteobaccan:masterfrom
drapostolos:string-substitutor
Open

Custom string substitutors functionality#108
drapostolos wants to merge 1 commit intomatteobaccan:masterfrom
drapostolos:string-substitutor

Conversation

@drapostolos
Copy link
Copy Markdown
Contributor

As requested here are the unit test for such functionality (plus the necessary implementation to compile). If this functionality is approved, then I'll modify this pull request with an actual implementation.

/Alex

@drapostolos
Copy link
Copy Markdown
Contributor Author

My use case for this is:

I want to create a unique directory path, where I can place logs gathered during automatic tests. I.e. a unique folder for each test run. I would like to be able to specify this path in my configuration file, something like this:
logDirPath = ${user.home}${file.separator}${date:yyyyMMdd-HHmmssSSS}
which in practice will result in something like this:
C:\Users\alex\20141018-163934471
C:\Users\alex\20141018-164011056

My Config class will be instantiated once per test-run where the ${date:yyyyMMdd-HHmmssSSS} represents the (approx) date/time when it was constructed. Each call to the logDirPath() on the same instance must return the same value (so the same folder path is used everywhere in my code base).

/Alex

@drapostolos
Copy link
Copy Markdown
Contributor Author

Implementation of this feature is now added. Comments?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.13%) when pulling 787b5f8 on drapostolos:string-substitutor into d1b7344 on lviggiano:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.13%) when pulling 0768e9a on drapostolos:string-substitutor into d1b7344 on lviggiano:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.13%) when pulling 0768e9a on drapostolos:string-substitutor into d1b7344 on lviggiano:master.

@lviggiano lviggiano force-pushed the master branch 6 times, most recently from df63501 to 3ef11bd Compare July 22, 2015 16:48
@lviggiano lviggiano force-pushed the master branch 2 times, most recently from 1b8f02f to cd3dc86 Compare June 7, 2020 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants