I don't have any ideas for this, but I looked around at them myself.
 You'll notice in TestQueryParser.cs, it inherits from LocalizedTestCase,
which is good.  It means that we should be able to identify fairly easily
which unit tests should be localized.  However, there is no automated way
to do this as in Java (as you mentioned correctly, using runBare).  I've
looked into it a bit, and while you can add attributes to NUnit that will
run a test under a different culture.  However, NUnit doesn't yet support
adding multiple cultures to a single test (MbUnit does support this
feature).

Out of the solutions you've suggested, I wouldn't want to change unit
testing frameworks at this point and I'm not sure if an NUnit addin would
work.  Rewriting it seems to be the best option, however we might decide to
do it.

Alternatively, we could try and add the functionality into NUnit and commit
it back to that project, which would be even better, as it would benefit
both projects.


Thanks,
Christopher

On Thu, Jun 14, 2012 at 11:10 AM, Simon Svensson <si...@devhost.se> wrote:

> I've been thinking about LUCENENET-493 (Make Lucene.Net culture
> insensitive). It's easy to fix the code, and verify it on my machine
> (running CurrentCulture=sv-SE), but there are no tests to confirm the
> changes. I've been looking for ways to build test cases for different
> cultures, like the overridden runBare method used originally in the java
> code, but NUnit does not seem to have any such abilities within the tests
> themselves.
>
> 1) It is possible to build NUnit addins that could execute every test
> [with special annotation?] once for every culture. Resharper supports NUnit
> addins, provided they are manually placed in the correct folder under the
> resharper application folder.
> 2) We could rewrite culture sensitive tests into method that holds the
> logic, and several test methods with [SetCulture("...")], but this requires
> knowledge about what tests are culture sensitive. We could also rewrite
> every method into a foreach-loop, executing the test logic with every
> culture.
> 3) Change unit testing framework.
>
> Any thoughts?
>
>
> On 2012-06-14 17:58, Prescott Nasser wrote:
>
>> I'm going to try and review some of them - looking at the 3.5 ticket atm.
>> The code should be in compliance with 3.0.3. We might want to do some spot
>> checking various parts of the code. I'm not sure about the tests. Also, we
>> should probably run some code coverage tools to see how much coverage we
>> have.
>> ~P
>>
>>> Date: Thu, 14 Jun 2012 18:37:12 +0300
>>> Subject: Re: Releasing 3.0.3
>>> From: ita...@code972.com
>>> To: lucene-net-dev@lucene.apache.**org<lucene-net-dev@lucene.apache.org>
>>>
>>> Ok, and is the code in 100% compliance with the 3.0.3 Java code?
>>>
>>> I'll be spending some time on fixing the index corruption issue, and it
>>> is
>>> probably best for Chris to wrap up the work he has started
>>>
>>> Anyone else on board to close some tickets?
>>>
>>> On Thu, Jun 14, 2012 at 6:19 PM, Prescott Nasser<geobmx...@hotmail.com>*
>>> *wrote:
>>>
>>>  Agreed -
>>>> JIRA for 3.0.3
>>>> https://issues.apache.org/**jira/browse/LUCENENET/**
>>>> fixforversion/12316215#**selectedTab=com.atlassian.**
>>>> jira.plugin.system.project%**3Aversion-issues-panel<https://issues.apache.org/jira/browse/LUCENENET/fixforversion/12316215#selectedTab=com.atlassian.jira.plugin.system.project%3Aversion-issues-panel>
>>>> We should evaluate all of these - fix them, mark as won't fix, or move
>>>> them to another release version. I think the biggest hold up currently
>>>> is:
>>>> https://issues.apache.org/**jira/browse/LUCENENET-484<https://issues.apache.org/jira/browse/LUCENENET-484>.
>>>> Chris has made a
>>>> huge dent, but there are two test cases that are still listed as
>>>> failing (I
>>>> can't even duplicate those failures to know where to start)
>>>> Also we should look at all the other jira tickets and make updates where
>>>> appropriate
>>>> ~P
>>>>
>>>>> Date: Thu, 14 Jun 2012 13:21:04 +0300
>>>>> Subject: Releasing 3.0.3
>>>>> From: ita...@code972.com
>>>>> To: lucene-net-dev@lucene.apache.**org<lucene-net-dev@lucene.apache.org>
>>>>>
>>>>> Where do we stand with this?
>>>>>
>>>>> I want to push to a 3.0.3 release, what items are still pending?
>>>>>
>>>>> Itamar.
>>>>>
>>>>
>>>>
>>
>

Reply via email to