Skip to content

Commit

Permalink
Remove obsolete conditional compilation symbols NUNIT_SETCULTUREATTRI…
Browse files Browse the repository at this point in the history
…BUTE and NUNIT_TIMEOUTATTRIBUTE
  • Loading branch information
Jevonius committed Nov 30, 2022
1 parent 4ffd79c commit 1263d4a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,3 @@ The following conditional compilation symbols are defined for tests only under .
* `FEATURE_CONSOLETRACELISTENER` - enables code that requires `System.Diagnostics.ConsoleTraceListener`.
* `FEATURE_THREADABORT` - enables code that uses `Thread.Abort()`.
* `FEATURE_WPF` - enables code that uses `PresentationCore.dll`.
* `NUNIT_SETCULTUREATTRIBUTE` - uses `NUnit.Framework.SetCultureAttribute`.
* `NUNIT_TIMEOUTATTRIBUTE` - uses `NUnit.Framework.TimeoutAttribute`.
2 changes: 1 addition & 1 deletion src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net462'">
<DefineConstants>$(DefineConstants);NUNIT_SETCULTUREATTRIBUTE;NUNIT_TIMEOUTATTRIBUTE;FEATURE_THREADABORT;FEATURE_WPF;FEATURE_CONSOLETRACELISTENER</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_THREADABORT;FEATURE_WPF;FEATURE_CONSOLETRACELISTENER</DefineConstants>
</PropertyGroup>

</Project>
9 changes: 3 additions & 6 deletions src/Castle.Windsor.Tests/DefaultConversionManagerTestCase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2022 Castle Project - http://www.castleproject.org/
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,20 +29,17 @@ public class DefaultConversionManagerTestCase
{
private readonly DefaultConversionManager converter = new DefaultConversionManager();

#if NUNIT_SETCULTUREATTRIBUTE
// currently not supported by SL
[Test]
[SetCulture("pl-PL")]
[Bug("IOC-314")]
public void Converting_numbers_uses_oridinal_culture()
public void Converting_numbers_uses_ordinal_culture()
{
Assert.AreEqual(",", Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator);

var result = converter.PerformConversion<Decimal>("123.456");
var result = converter.PerformConversion<decimal>("123.456");

Assert.AreEqual(123.456m, result);
}
#endif

[Test]
public void PerformConversionInt()
Expand Down
4 changes: 1 addition & 3 deletions src/Castle.Windsor.Tests/LazyLoadingTestCase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2004-2011 Castle Project - http://www.castleproject.org/
// Copyright 2004-2022 Castle Project - http://www.castleproject.org/
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,7 +63,6 @@ public void Component_loaded_lazily_can_have_lazy_dependencies()
Container.Resolve<B>();
}

#if NUNIT_TIMEOUTATTRIBUTE
[Test]
[Timeout(2000)]
public void Loaders_are_thread_safe()
Expand Down Expand Up @@ -98,7 +97,6 @@ public void Loaders_are_thread_safe()
Assert.IsNull(exception);
Assert.AreEqual(0, count[0]);
}
#endif

[Test]
public void Loaders_only_triggered_when_resolving()
Expand Down

0 comments on commit 1263d4a

Please sign in to comment.