nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #03319
Re: [Bug 1082330] Re: Better Exception if SetCulture attribute is applied multiple times
My 10 cents.
I'd find it more natural if the behaviour was changed so that applying
it multiple times caused the test to be run multiple times, once for
each test.
The reason I say this is I'm sure I saw Charlie mentioning comma
separating the list of cultures. That's fair enough, but if you can
apply the attribute multiple times, you don't need to know that to run
the test for multiple cultures you need to comma separate the
arguments.
On 23 Nov 2012, at 17:40, Simone Busoli <1082330@xxxxxxxxxxxxxxxxxx>
wrote:
> I'd suggest that in 3.0 the attribute is changed to not allow multiple
> instances then, which will break at compile time rather than runtime.
>
> --
> You received this bug notification because you are a member of NUnit
> Developers, which is subscribed to NUnit V2.
> https://bugs.launchpad.net/bugs/1082330
>
> Title:
> Better Exception if SetCulture attribute is applied multiple times
>
> Status in NUnit Test Framework:
> Triaged
> Status in NUnitLite Testing Framework:
> Triaged
> Status in NUnit V2 Test Framework:
> Triaged
>
> Bug description:
> The following exception is throw If I accidentally apply twice a
> SetCulture attribute to a test case. It would be nice if the exception
> message would point to the cause of the problem.
>
> System.ArgumentException: An entry with the same key already exists.
> Server stack trace: at
> System.Collections.Specialized.ListDictionary.Add(Object key, Object
> value) at NUnit.Core.NUnitFramework.ApplyCommonAttributes(Attribute[]
> attributes, Test test) at
> NUnit.Core.Builders.NUnitTestCaseBuilder.BuildSingleTestMethod(MethodInfo
> method, Test parentSuite, ParameterSet parms) at
> NUnit.Core.Builders.NUnitTestCaseBuilder.BuildFrom(MethodInfo method,
> Test parentSuite) at
> NUnit.Core.Extensibility.TestCaseBuilderCollection.BuildFrom(MethodInfo
> method, Test suite) at
> NUnit.Core.Builders.NUnitTestFixtureBuilder.AddTestCases(Type
> fixtureType) at
> NUnit.Core.Builders.NUnitTestFixtureBuilder.BuildSingleFixture(Type
> type, Attribute attr) at
> NUnit.Core.Builders.NUnitTestFixtureBuilder.BuildFrom(Type type) at
> NUnit.Core.Extensibility.SuiteBuilderCollection.BuildFrom(Type type)
> at NUnit.Core.TestFixtureBuilder.BuildFrom(Type type) at
> NUnit.Core.Builders.TestAssemblyBuilder.GetFixtures(Assembly assembly,
> String ns) at NUnit.Core.Builders.TestAssemblyBuilder.Build(String
> assemblyName, Boolean autoSuites) at
> NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName,
> String testName, Boolean autoSuites) at
> NUnit.Core.TestSuiteBuilder.Build(TestPackage package) at
> NUnit.Core.SimpleTestRunner.Load(TestPackage package) at
> NUnit.Core.ProxyTestRunner.Load(TestPackage package) at
> NUnit.Core.ProxyTestRunner.Load(TestPackage package) at
> NUnit.Core.RemoteTestRunner.Load(TestPackage package) at
> System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
> md, Object[] args, Object server, Object[]& outArgs) at
> System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
> msg)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunit-3.0/+bug/1082330/+subscriptions
--
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/1082330
Title:
Better Exception if SetCulture attribute is applied multiple times
Status in NUnit Test Framework:
Triaged
Status in NUnitLite Testing Framework:
Triaged
Status in NUnit V2 Test Framework:
Triaged
Bug description:
The following exception is throw If I accidentally apply twice a
SetCulture attribute to a test case. It would be nice if the exception
message would point to the cause of the problem.
System.ArgumentException: An entry with the same key already exists.
Server stack trace: at
System.Collections.Specialized.ListDictionary.Add(Object key, Object
value) at NUnit.Core.NUnitFramework.ApplyCommonAttributes(Attribute[]
attributes, Test test) at
NUnit.Core.Builders.NUnitTestCaseBuilder.BuildSingleTestMethod(MethodInfo
method, Test parentSuite, ParameterSet parms) at
NUnit.Core.Builders.NUnitTestCaseBuilder.BuildFrom(MethodInfo method,
Test parentSuite) at
NUnit.Core.Extensibility.TestCaseBuilderCollection.BuildFrom(MethodInfo
method, Test suite) at
NUnit.Core.Builders.NUnitTestFixtureBuilder.AddTestCases(Type
fixtureType) at
NUnit.Core.Builders.NUnitTestFixtureBuilder.BuildSingleFixture(Type
type, Attribute attr) at
NUnit.Core.Builders.NUnitTestFixtureBuilder.BuildFrom(Type type) at
NUnit.Core.Extensibility.SuiteBuilderCollection.BuildFrom(Type type)
at NUnit.Core.TestFixtureBuilder.BuildFrom(Type type) at
NUnit.Core.Builders.TestAssemblyBuilder.GetFixtures(Assembly assembly,
String ns) at NUnit.Core.Builders.TestAssemblyBuilder.Build(String
assemblyName, Boolean autoSuites) at
NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName,
String testName, Boolean autoSuites) at
NUnit.Core.TestSuiteBuilder.Build(TestPackage package) at
NUnit.Core.SimpleTestRunner.Load(TestPackage package) at
NUnit.Core.ProxyTestRunner.Load(TestPackage package) at
NUnit.Core.ProxyTestRunner.Load(TestPackage package) at
NUnit.Core.RemoteTestRunner.Load(TestPackage package) at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Object[]& outArgs) at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nunit-3.0/+bug/1082330/+subscriptions
References