Problem Statement
TestContext.Current.Isolation.GetIsolatedName("db") returns Test_42_db which starts with an uppercase character. This is suboptimal for various use-cases such as Elasticsearch indices which only allow lowercase identifiers.
Proposed Solution
Just change Test_*_* to test_*_*. This tiny change should increase compatibility with external services.
Alternatives Considered
Calling .ToLower() is of course a simple workaround, but I don't see any reason why the default behavior shouldn't be the same with GetIsolatedName() and GetIsolatedPrefix() with the latter already returning a lowercase string.
Feature Category
Test Execution / Lifecycle
How important is this feature to you?
Nice to have - would improve my experience
Additional Context
Technically this is a breaking change but I doubt it will break much. The method only claims to provide a unique value which it will still do afterwards.
Relevant class: https://github.com/thomhurst/TUnit/blob/main/src/TUnit.Core/TestContext.Isolation.cs
Contribution
Problem Statement
TestContext.Current.Isolation.GetIsolatedName("db")returnsTest_42_dbwhich starts with an uppercase character. This is suboptimal for various use-cases such as Elasticsearch indices which only allow lowercase identifiers.Proposed Solution
Just change
Test_*_*totest_*_*. This tiny change should increase compatibility with external services.Alternatives Considered
Calling
.ToLower()is of course a simple workaround, but I don't see any reason why the default behavior shouldn't be the same withGetIsolatedName()andGetIsolatedPrefix()with the latter already returning a lowercase string.Feature Category
Test Execution / Lifecycle
How important is this feature to you?
Nice to have - would improve my experience
Additional Context
Technically this is a breaking change but I doubt it will break much. The method only claims to provide a unique value which it will still do afterwards.
Relevant class: https://github.com/thomhurst/TUnit/blob/main/src/TUnit.Core/TestContext.Isolation.cs
Contribution