Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUNIT_SETCULTUREATTRIBUTE and NUNIT_TIMEOUTATTRIBUTE (Remove) #635

Merged
merged 1 commit into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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