Sellorio / JazSharp

Jasmine inspired mocking and unit testing framework for C#.
Apache License 2.0
65 stars 4 forks source link

TestAdapter logs to hardcoded file paths #7

Closed akamsteeg closed 5 years ago

akamsteeg commented 5 years ago

I was just browsing through the source and noticed that the TestExecutor in JazSharp.TestAdapter logs to hardcoded file paths when an error occurs:

https://github.com/Sellorio/JazSharp/blob/d878e75a69d360f7cf299e5469bdce7d607093ac/JazSharp.TestAdapter/TestExecutor.cs#L47

https://github.com/Sellorio/JazSharp/blob/d878e75a69d360f7cf299e5469bdce7d607093ac/JazSharp.TestAdapter/TestExecutor.cs#L61

https://github.com/Sellorio/JazSharp/blob/d878e75a69d360f7cf299e5469bdce7d607093ac/JazSharp.TestAdapter/TestExecutor.cs#L92

I think this is undesirable, since it results in polluting the user's file system. Also (have not verified this) I can imagine that a non-elevated user cannot arbitrarily create new folders in the user profile directory.

Sellorio commented 5 years ago

Good catch. It was just there for some debugging. It would fail on other people's machine since their username won't be seamillo.

Sellorio commented 5 years ago

Fixed in commit https://github.com/Sellorio/JazSharp/commit/ab2ea6a1e8091d84af0f3f3e8b958b1b835f2716