apache/lucenenet — pull request #32 by laimis (2014-12-30 01:40:22+00:00)
Title: throw a more informative exception to track down TeamCity test failures

TeamCity CI tests show a lot of tests failing locating test artifacts:

Test(s) failed. System.ArgumentOutOfRangeException : StartIndex cannot be less than zero.
Parameter name: startIndex
at System.String.Substring(Int32 startIndex, Int32 length)
at Lucene.Net.Util.Paths.get_ProjectRootDirectory() in z:\Builds\work\bcdbe6b8cc677a49\src\Lucene.Net.TestFramework\Util\Paths.cs:line 145
at Lucene.Net.Util.Paths.ResolveTestArtifactPath(String fileName) in z:\Builds\work\bcdbe6b8cc677a49\src\Lucene.Net.TestFramework\Util\Paths.cs:line 115
at Lucene.Net.Util.LineFileDocs..ctor(Random random, String path, Boolean useDocValues) in z:\Builds\work\bcdbe6b8cc677a49\src\Lucene.Net.TestFramework\Util\LineFileDocs.cs:line 248

Link: http://teamcity.codebetter.com/viewLog.html?buildId=176935&tab=buildResultsDiv&buildTypeId=LuceneNet_Core#testNameId-5403764739034623459

Hard to say what the issue is as running locally from NUnit or R# in VS does not cause this issue to appear even though the same code path is triggered.

Added a better exception that will report what value is returned for assembly location that might be something that is not expected.