Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom string substitutors functionality #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drapostolos
Copy link
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
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
Contributor Author

Implementation of this feature is now added. Comments?

@coveralls
Copy link

Coverage Status

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

@coveralls
Copy link

Coverage Status

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

@coveralls
Copy link

Coverage Status

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

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.

None yet

2 participants