Skip to content

Port DictionaryAdapter and tests to .Net Core #119

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

Merged
merged 31 commits into from
Dec 29, 2015
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
13810ca
Enable System.ComponentModel.BindingList only when FEATURE_BINDINGLIS…
jeremymeng Nov 22, 2015
b4e9bd7
Enable use of ListSortDescription when FEATURE_LISTSORT is defined.
jeremymeng Nov 22, 2015
1f1e1b3
Enable ISupportInitialize when FEATURE_ISUPPORTINITIALIZE is defined.
jeremymeng Nov 22, 2015
123029d
Enable DictionaryAdapter Xml feature only when FEATURE_DICTIONARYADAP…
jeremymeng Nov 23, 2015
c51e34e
Add a shim for IDataErrorInfo for .Net Core.
jeremymeng Nov 24, 2015
69d4c7a
Add FEATURE_DICTIONARYADAPTER_XML that was missed in previous commit.
jeremymeng Nov 24, 2015
1e9b118
Merge DictionaryAdapter changes.
jeremymeng Nov 26, 2015
d701b0f
Replace System.Converter with a custom TestConverter delegate so we c…
jeremymeng Nov 26, 2015
3e9bf3a
Enable DictionaryAdapter (sans Xml) features. Six new test failures t…
jeremymeng Nov 26, 2015
659ef82
Fix an error where GetCustomAttributes(attributeType, b) requires pas…
jeremymeng Nov 26, 2015
25becef
Exclude AssemblyInfo.cs that is auto-generated by other non-Core proj…
jeremymeng Nov 26, 2015
6fdb436
Merge the change of disabling signing assebmlies.
jeremymeng Nov 30, 2015
3de0b55
Disable tests that need FEATURE_ASSEMBLYBUILDER_SAVE or FEATURE_STRON…
jeremymeng Dec 4, 2015
f10ae24
Restore whitespaces that were removed by auto-formatting.
jeremymeng Dec 4, 2015
9c96e1b
Remove comments that previously follows #if !SILVERLIGHT.
jeremymeng Dec 4, 2015
2f7bc72
Restore whitespace.
jeremymeng Dec 4, 2015
2ce7a84
Fix one assembly resource test. .Net Core uses assembly name as part…
jeremymeng Dec 8, 2015
87c36c3
Pass in the type on which the property is being reflected and use it …
jeremymeng Dec 8, 2015
8b23a0c
Fix several tests on .Net Core as FEATURE_STRONGNAME is not supported.
jeremymeng Dec 8, 2015
3b67054
Disable a test that requires PEVerify on .Net Core.
jeremymeng Dec 8, 2015
a4ea30c
Disable tracelogger tests on .Net Core as they are depending on Syste…
jeremymeng Dec 9, 2015
f9644dd
Fix another resource test due to the difference in resource path.
jeremymeng Dec 9, 2015
4369d94
Remove empty "exclude" section.
jeremymeng Dec 14, 2015
1839d0c
Use the already-defined FEATURE_SYSTEM_CONFIGURATION constant.
jeremymeng Dec 14, 2015
8a7a18c
Remove the Ignore attribute that no longer applies and wrap the whole…
jeremymeng Dec 14, 2015
04bc463
Use more proper FEATURE_LEGACY_REFLECTION_API constant.
jeremymeng Dec 14, 2015
8f1e4b3
Use named resources.
jeremymeng Dec 15, 2015
6f75c96
Use FEATURE_IDATAERRORINFO conditional compilation constant.
jeremymeng Dec 18, 2015
ef31f30
Merge branch 'IDataErrorInfo' into netcore
jeremymeng Dec 18, 2015
42d7c45
Address code review feedback: removing unused conditional compilation…
jeremymeng Dec 24, 2015
ac6d6ee
Undo the exclusion of generated AssemblyInfo.cs.
jeremymeng Dec 24, 2015
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
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,19 @@ Symbol | NET35 | NET40 |
----------------------------------- | ------------------ | ------------------ | ------------------ | ------------------
`FEATURE_APPDOMAIN` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_ASSEMBLYBUILDER_SAVE` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_BINDINGLIST` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_CONFIGURATION` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a FEATURE_SYSTEM_CONFIGURATION symbol.

`FEATURE_DICTIONARYADAPTER_XML` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_EMIT_CUSTOMMODIFIERS` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_EVENTLOG` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_GAC` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_GET_REFERENCED_ASSEMBLIES` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_ISUPPORTINITIALIZE` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_LEGACY_REFLECTION_API` | :white_check_mark: | :white_check_mark: | :no_entry_sign: | :no_entry_sign:
`FEATURE_NETCORE_CONVERTER_API` | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark:
`FEATURE_LISTSORT` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_NETCORE_COMPONENTMODEL_API | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark:
`FEATURE_NETCORE_REFLECTION_API` | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark:
`FEATURE_NETCORE_RESOURCE` | :no_entry_sign: | :no_entry_sign: | :no_entry_sign: | :white_check_mark:
`FEATURE_REMOTING` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_SECURITY_PERMISSIONS` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
`FEATURE_SERIALIZATION` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry_sign:
Expand All @@ -68,17 +74,23 @@ Symbol | NET35 | NET40 |

* `FEATURE_APPDOMAIN` - enables support for features that make use of an AppDomain in the host.
* `FEATURE_ASSEMBLYBUILDER_SAVE` - enabled support for saving the dynamically generated proxy assembly.
* `FEATURE_BINDINGLIST` - enables support features that make use of System.ComponentModel.BindingList.
* `FEATURE_CONFIGURATION` - enables System.Configuration features.
* `FEATURE_DICTIONARYADAPTER_XML` - enable DictionaryAdapter Xml features.
* `FEATURE_EMIT_CUSTOMMODIFIERS` - enables emitting optional and required custom modifiers defined on parameters including return parameters. It seems like a defect in corefx not to expose these methods because they are still implemented.
* `FEATURE_EVENTLOG` - provides a diagnostics logger using the Windows Event Log.
* `FEATURE_GAC` - enables support for obtaining assemblies using an assembly long form name.
* `FEATURE_GET_REFERENCED_ASSEMBLIES` - enables code that takes advantage of System.Reflection.Assembly.GetReferencedAssemblies().
* `FEATURE_ISUPPORTINITIALIZE` - enables support for features that make use of System.ComponentModel.ISupportInitialize.
* `FEATURE_LISTSORT` - enables support for features that make use of System.ComponentModel.ListSortDescription.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LE comes before LI, it is right above in the table.

* `FEATURE_LEGACY_REFLECTION_API` - provides a shim for .NET 3.5/4.0 that emulates the `TypeInfo` API available in .NET 4.5+ and .NET Core.
* `FEATURE_NETCORE_CONVERTER_API` - provides shims to implement missing Converter in .NET Core.
* `FEATURE_NETCORE_COMPONENTMODEL_API` - provides shims to implement missing System.ComponentModel features in .Net Core.
* `FEATURE_NETCORE_REFLECTION_API` - provides shims to implement missing functionality in .NET Core that has no alternatives.
* `FEATURE_NETCORE_RESOURCE` - enables different resource probing behavior on .Net Core.
* `FEATURE_REMOTING` - supports remoting on various types including inheriting from MarshalByRefObject.
* `FEATURE_SECURITY_PERMISSIONS` - enables the use of CAS and Security[Critical|SafeCritical|Transparent].
* `FEATURE_SERIALIZATION` - enables support for serialization of dynamic proxies and other types.
* `FEATURE_SMTP` - providers the email sender abstraction and implementation.
* `FEATURE_SMTP` - provides the email sender abstraction and implementation.
* `FEATURE_STRONGNAME` - supports a strong named `Castle.Core.dll` assembly.
* `FEATURE_SYSTEM_CONFIGURATION` - enables features that use System.Configuration and the ConfigurationManager.
* `FEATURE_TARGETEXCEPTION` - enabled catching a `TargetException`. `System.Reflection.TargetException` is implemented by .NET Core but not exposed by corefx.
Expand Down
5 changes: 5 additions & 0 deletions Settings.proj
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ limitations under the License.
<AdditionalDefineConstants></AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_APPDOMAIN</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_ASSEMBLYBUILDER_SAVE</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_BINDINGLIST</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_CONFIGURATION</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_DICTIONARYADAPTER_XML</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_EMIT_CUSTOMMODIFIERS</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_EVENTLOG</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_GAC</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_GET_REFERENCED_ASSEMBLIES</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_ISUPPORTINITIALIZE</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_LISTSORT</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_REMOTING</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_SECURITY_PERMISSIONS</AdditionalDefineConstants>
<AdditionalDefineConstants>$(AdditionalDefineConstants) FEATURE_SERIALIZATION</AdditionalDefineConstants>
Expand Down
4 changes: 3 additions & 1 deletion src/Castle.Core.Tests/BaseTestCaseTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void TearDown_DoesNotSaveAnything_IfNoProxyGenerated()
}

[Test]
#if SILVERLIGHT
#if !FEATURE_ASSEMBLYBUILDER_SAVE
[Ignore("Cannot do in Silverlight")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ignore description is no longer correct, maybe just remove the description because the symbol explains why. Or better yet, put the conditional around the whole unit test like you've done with the other one in this file below.

#endif
#if __MonoCS__
Expand Down Expand Up @@ -91,6 +91,7 @@ private void FindVerificationErrors()
base.TearDown();
}

#if FEATURE_ASSEMBLYBUILDER_SAVE
[Test]
#if SILVERLIGHT
[Ignore("Cannot do in Silverlight")]
Expand All @@ -106,6 +107,7 @@ public void TearDown_FindsVerificationErrors()
StringAssert.Contains("PeVerify reported error(s)", ex.Message);
StringAssert.Contains("fall through end of the method without returning", ex.Message);
}
#endif

[Test]
public void DisableVerification_DisablesVerificationForTestCase()
Expand Down
4 changes: 4 additions & 0 deletions src/Castle.Core.Tests/BasicClassProxyTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ public void ProxyForNonPublicClass()
var type = Type.GetType("System.AppDomainInitializerInfo, mscorlib");
var exception = Assert.Throws<GeneratorException>(() => generator.CreateClassProxy(type, new StandardInterceptor()));
Assert.AreEqual(
#if FEATURE_STRONGNAME
"Can not create proxy for type System.AppDomainInitializerInfo because it is not accessible. Make it public, or internal and mark your assembly with [assembly: InternalsVisibleTo(\"DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7\")] attribute, because assembly mscorlib is strong-named.",
#else
"Can not create proxy for type System.AppDomainInitializerInfo because it is not accessible. Make it public, or internal and mark your assembly with [assembly: InternalsVisibleTo(\"DynamicProxyGenAssembly2\")] attribute, because assembly mscorlib is strong-named.",
#endif
exception.Message);
}

Expand Down
2 changes: 2 additions & 0 deletions src/Castle.Core.Tests/BasicInterfaceProxyTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ public void Cannot_proxy_inaccessible_interface()
ex.Message);
}

#if FEATURE_STRONGNAME
[Test]
public void Cannot_proxy_generic_interface_with_inaccessible_type_argument()
{
Expand All @@ -261,6 +262,7 @@ public void Cannot_proxy_generic_interface_with_inaccessible_type_argument()
"Can not create proxy for type System.Collections.Generic.IList`1[[Castle.DynamicProxy.Tests.BasicInterfaceProxyTestCase+PrivateInterface, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.BasicInterfaceProxyTestCase+PrivateInterface is not accessible. Make it public, or internal",
ex.Message);
}
#endif

[Test]
public void Cannot_proxy_generic_interface_with_type_argument_that_has_inaccessible_type_argument()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if !SILVERLIGHT // Until support for other platforms is verified
#if FEATURE_DICTIONARYADAPTER_XML
namespace Castle.Components.DictionaryAdapter.Tests
{
using System;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Castle.Components.DictionaryAdapter.Tests
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

using CastleTests.Components.DictionaryAdapter.Tests;

Expand Down Expand Up @@ -429,7 +430,7 @@ public void ReadAdapter_WithDefaultConversions_WorksFine()
dictionary["Double"] = string.Format("{0}", 3.14D);
dictionary["Decimal"] = string.Format("{0}", 100M);
dictionary["String"] = "Hello World";
dictionary["DateTime"] = now.ToShortDateString();
dictionary["DateTime"] = now.ToString("d");
dictionary["Guid"] = guid.ToString();

var conversions = factory.GetAdapter<IConversions>(dictionary);
Expand Down Expand Up @@ -468,7 +469,7 @@ public void UpdateAdapter_WithDefaultConversions_WorksFine()
#if SILVERLIGHT // SL impl limitation
Assert.AreEqual(today.ToString(), dictionary["DateTime"]);
#else
Assert.AreEqual(today.ToShortDateString(), dictionary["DateTime"]);
Assert.AreEqual(today.ToString("d"), dictionary["DateTime"]);
#endif
Assert.AreEqual(guid.ToString(), dictionary["Guid"]);
Assert.AreEqual("2124751012,22", dictionary["Phone"]);
Expand All @@ -484,7 +485,7 @@ public void ReadAdapter_WithDefaultNullableConversions_WorksFine()
dictionary["NullFloat"] = string.Format("{0}", 98.6);
dictionary["NullDouble"] = string.Format("{0}", 3.14D);
dictionary["NullDecimal"] = string.Format("{0}", 100M);
dictionary["NullDateTime"] = now.Value.ToShortDateString();
dictionary["NullDateTime"] = now.Value.ToString("d");
dictionary["NullGuid"] = guid.ToString();

var conversions = factory.GetAdapter<IConversions>(dictionary);
Expand Down Expand Up @@ -517,7 +518,7 @@ public void UpdateAdapter_WithDefaultNullableConversions_WorksFine()
#if SILVERLIGHT // SL impl limitation
Assert.AreEqual(today.Value.ToString(), dictionary["NullDateTime"]);
#else
Assert.AreEqual(today.Value.ToShortDateString(), dictionary["NullDateTime"]);
Assert.AreEqual(today.Value.ToString("d"), dictionary["NullDateTime"]);
#endif
Assert.AreEqual(guid.ToString(), dictionary["NullGuid"]);
}
Expand Down Expand Up @@ -767,7 +768,7 @@ public void WillNotPropagatePropertyChangedEventWhenNestedPropertyChanged()
container.Item.Name = "Craig";
}

#if !SILVERLIGHT //no BindingList in Silverlight
#if FEATURE_BINDINGLIST

[Test]
public void WillPropagatePropertyChangedEventWhenBindingListPropertyChanged()
Expand Down Expand Up @@ -1257,7 +1258,7 @@ public void CanGetInterfacePropertyOnDemand()
Assert.IsNotNull(container.Phone);
}

#if !SILVERLIGHT //no BindingList in Silverlight
#if FEATURE_BINDINGLIST

[Test]
public void CanAddBindingListItemsOnDemand()
Expand Down Expand Up @@ -1321,7 +1322,7 @@ public void CanGetNewGuidPropertyOnDemand()
public void CanDetermineTheAdaptedInterface()
{
var person = factory.GetAdapter<IPerson>(dictionary);
var type = person.GetType().GetCustomAttributes(
var type = person.GetType().GetTypeInfo().GetCustomAttributes(
typeof(DictionaryAdapterAttribute), false).Cast<DictionaryAdapterAttribute>()
.FirstOrDefault();
Assert.IsNotNull(type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface IItemContainer<TItem> : IDictionaryAdapter, IDictionaryCreate,

IList<TItem> GenericItems { get; set; }

#if !SILVERLIGHT
#if FEATURE_BINDINGLIST
BindingList<TItem> Bindingtems { get; set; }
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Castle.Components.DictionaryAdapter.Tests
{
#if !SILVERLIGHT
#if FEATURE_DICTIONARYADAPTER_XML
using System;
using System.Collections;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ public void CanHandleBundleResource()
{
IResource resource =
new AssemblyBundleResource(
new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.MoreRes.TestRes/content1"));
#if !FEATURE_NETCORE_RESOURCE
new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.MoreRes.TestRes/content1")
#else
new CustomUri("assembly://" + AssemblyName + "/Castle.Core.Tests.Core.Tests.Resources.MoreRes.TestRes/content1")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you could set the name of the resource in the project.json file? If not, then I'd prefer we rename the .NET Framework one rather than more conditional compilation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you could set the name of the resource in the project.json file?

Yes, named resources are better here. Fixed.

#endif
);

Assert.IsNotNull(resource);
var line = resource.GetStreamReader().ReadLine();
Expand All @@ -65,8 +70,11 @@ public void CanHandleBundleResource()
[Test]
public void CreateWithAbsolutePath()
{
#if !FEATURE_NETCORE_RESOURCE
var resource = resFactory.Create(new CustomUri("assembly://" + AssemblyName + "/CastleTests.Core.Tests.Resources.file1.txt"));

#else
var resource = resFactory.Create(new CustomUri("assembly://" + AssemblyName + "/Castle.Core.Tests.Core.Tests.Resources.file1.txt"));
#endif
Assert.IsNotNull(resource);
var line = resource.GetStreamReader().ReadLine();
Assert.AreEqual("Something", line);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public void Cannot_proxy_inaccessible_class()
ex.Message);
}

#if FEATURE_STRONGNAME
[Test]
public void Cannot_proxy_generic_class_with_inaccessible_type_argument()
{
Expand All @@ -138,6 +139,7 @@ public void Cannot_proxy_generic_class_with_inaccessible_type_argument()
"Can not create proxy for type System.Collections.Generic.List`1[[Castle.DynamicProxy.Tests.ClassProxyConstructorsTestCase+PrivateClass, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.ClassProxyConstructorsTestCase+PrivateClass is not accessible. Make it public, or internal",
ex.Message);
}
#endif

[Test]
public void Cannot_proxy_generic_class_with_type_argument_that_has_inaccessible_type_argument()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public void Cannot_proxy_inaccessible_class()
ex.Message);
}

#if FEATURE_STRONGNAME
[Test]
public void Cannot_proxy_generic_class_with_inaccessible_type_argument()
{
Expand All @@ -120,6 +121,7 @@ public void Cannot_proxy_generic_class_with_inaccessible_type_argument()
"Can not create proxy for type System.Collections.Generic.List`1[[Castle.DynamicProxy.Tests.ClassProxyWithTargetTestCase+PrivateClass, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.ClassProxyWithTargetTestCase+PrivateClass is not accessible. Make it public, or internal",
ex.Message);
}
#endif

[Test]
public void Cannot_proxy_generic_class_with_type_argument_that_has_inaccessible_type_argument()
Expand Down
4 changes: 3 additions & 1 deletion src/Castle.Core.Tests/GenClasses/GenClassWithGenMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ public virtual T DoSomething<Z>(Z z)
return new T();
}

public virtual void DoSomethingElse<T2>(Converter<int, T2> converter, int value)
public virtual void DoSomethingElse<T2>(TestConverter<int, T2> converter, int value)
{
invoked = true;

savedParam = converter(value);
}
}

public delegate TOutput TestConverter<TInput, TOutput>(TInput input);
}
2 changes: 2 additions & 0 deletions src/Castle.Core.Tests/InterceptorSelectorTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ public void Cannot_proxy_inaccessible_interface()
ex.Message);
}

#if FEATURE_STRONGNAME
[Test]
public void Cannot_proxy_generic_interface_with_inaccessible_type_argument()
{
Expand All @@ -308,6 +309,7 @@ public void Cannot_proxy_generic_interface_with_inaccessible_type_argument()
"Can not create proxy for type System.Collections.Generic.IList`1[[Castle.DynamicProxy.Tests.InterceptorSelectorTestCase+PrivateInterface, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.InterceptorSelectorTestCase+PrivateInterface is not accessible. Make it public, or internal",
ex.Message);
}
#endif

[Test]
public void Cannot_proxy_generic_interface_with_type_argument_that_has_inaccessible_type_argument()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public void Cannot_proxy_inaccessible_interface()
ex.Message);
}

#if FEATURE_STRONGNAME
[Test]
public void Cannot_proxy_generic_interface_with_inaccessible_type_argument()
{
Expand All @@ -199,6 +200,7 @@ public void Cannot_proxy_generic_interface_with_inaccessible_type_argument()
"Can not create proxy for type System.Collections.Generic.IList`1[[Castle.DynamicProxy.Tests.InterfaceProxyWithTargetInterfaceTestCase+PrivateInterface, Castle.Core.Tests, Version=0.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc]] because type Castle.DynamicProxy.Tests.InterfaceProxyWithTargetInterfaceTestCase+PrivateInterface is not accessible. Make it public, or internal",
ex.Message);
}
#endif

[Test]
public void Cannot_proxy_generic_interface_with_type_argument_that_has_inaccessible_type_argument()
Expand Down
2 changes: 1 addition & 1 deletion src/Castle.Core.Tests/ModuleScopeTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public void ModuleScopeCanHandleSignedAndUnsignedInParallel()

#if !SILVERLIGHT

#if FEATURE_STRONGNAME
[Test]
#if __MonoCS__
[Ignore("Expected: CastleDynProxy2.dll But was: /home/teamcity/buildagent/work/...")]
Expand Down Expand Up @@ -110,7 +111,6 @@ public void ExplicitModulePaths()
Assert.AreEqual(@"d:\Bar", scope.WeakNamedModuleDirectory);
}

#if FEATURE_STRONGNAME
private static void CheckSignedSavedAssembly(string path)
{
Assert.IsTrue(File.Exists(path));
Expand Down
Loading