← Back to team overview

nunit-core team mailing list archive

[Bug 1082330] Re: Better Exception if SetCulture attribute is applied multiple times

 

** Branch linked: lp:nunitv2

-- 
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:
  Fix Committed
Status in NUnitLite Testing Framework:
  Fix Committed
Status in NUnit V2 Test Framework:
  Fix Committed

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