Skip to content

Commit 0d510d5

Browse files
authored
Net35 support (#4)
* Add support for net20 and net35 TFMs (#3) * Adding net35 target and unit tests
1 parent 3e0ea20 commit 0d510d5

16 files changed

+3654
-3
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{378EE300-C36E-4C4C-8D15-04041CD07451}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>AgileObjects.NetStandardPolyfills.UnitTests.Net35</RootNamespace>
11+
<AssemblyName>AgileObjects.NetStandardPolyfills.UnitTests.Net35</AssemblyName>
12+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
34+
<HintPath>..\packages\NUnit.3.6.1\lib\net35\nunit.framework.dll</HintPath>
35+
</Reference>
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
<Reference Include="System.Xml.Linq" />
39+
<Reference Include="System.Data.DataSetExtensions" />
40+
<Reference Include="System.Data" />
41+
<Reference Include="System.Xml" />
42+
</ItemGroup>
43+
<ItemGroup>
44+
<Compile Include="..\CommonAssemblyInfo.cs">
45+
<Link>Properties\CommonAssemblyInfo.cs</Link>
46+
</Compile>
47+
<Compile Include="Properties\AssemblyInfo.cs" />
48+
<Compile Include="WhenCheckingAssemblyData.cs" />
49+
<Compile Include="WhenCheckingTypeData.cs" />
50+
<Compile Include="WhenRetrievingTypeCodes.cs" />
51+
<Compile Include="WhenRetrievingTypeConstructors.cs" />
52+
<Compile Include="WhenRetrievingTypeFields.cs" />
53+
<Compile Include="WhenRetrievingTypeMembers.cs" />
54+
<Compile Include="WhenRetrievingTypeMethods.cs" />
55+
<Compile Include="WhenRetrievingTypeOperators.cs" />
56+
<Compile Include="WhenRetrievingTypeProperties.cs" />
57+
</ItemGroup>
58+
<ItemGroup>
59+
<ProjectReference Include="..\NetStandardPolyfills.UnitTests\NetStandardPolyfills.UnitTests.csproj">
60+
<Project>{e55fc755-fa63-46e8-8c0b-573e312ecdff}</Project>
61+
<Name>NetStandardPolyfills.UnitTests</Name>
62+
</ProjectReference>
63+
</ItemGroup>
64+
<ItemGroup>
65+
<None Include="packages.config" />
66+
</ItemGroup>
67+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
68+
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System.Reflection;
2+
using System.Runtime.InteropServices;
3+
4+
[assembly: AssemblyTitle("AgileObjects.NetStandardPolyfills.UnitTests.Net40")]
5+
[assembly: ComVisible(false)]
6+
7+
[assembly: AssemblyVersion("1.3.0.0")]
8+
[assembly: AssemblyFileVersion("1.3.0.0")]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace AgileObjects.NetStandardPolyfills.UnitTests.Net35
2+
{
3+
using NUnit.Framework;
4+
5+
[TestFixture]
6+
public class WhenCheckingAssemblyData : AssemblyDataTestsBase
7+
{
8+
[Test]
9+
public override void ShouldFindTypes() => DoShouldFindTypes();
10+
}
11+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
using NUnit.Framework;
2+
3+
namespace AgileObjects.NetStandardPolyfills.UnitTests.Net35
4+
{
5+
[TestFixture]
6+
public class WhenCheckingTypeData : TypeDataTestsBase
7+
{
8+
[Test]
9+
public override void ShouldDetermineThatATypeIsPublic() => DoShouldDetermineThatATypeIsPublic();
10+
11+
[Test]
12+
public override void ShouldDetermineThatATypeIsNonPublic() => DoShouldDetermineThatATypeIsNonPublic();
13+
14+
[Test]
15+
public override void ShouldFlagAParamsArray() => DoShouldFlagAParamsArray();
16+
17+
[Test]
18+
public override void ShouldFlagANonParamsArray() => DoShouldFlagANonParamsArray();
19+
20+
[Test]
21+
public override void ShouldFindATypeAttribute() => DoShouldFindATypeAttribute();
22+
23+
[Test]
24+
public override void ShouldNotFindATypeAttribute() => DoShouldNotFindATypeAttribute();
25+
26+
[Test]
27+
public override void ShouldFlagAnAnonymousType() => DoShouldFlagAnAnonymousType();
28+
29+
[Test]
30+
public override void ShouldFlagANonAnonymousType() => DoShouldFlagANonAnonymousType();
31+
32+
[Test]
33+
public override void ShouldFlagAPrimitiveType() => DoShouldFlagAPrimitiveType();
34+
35+
[Test]
36+
public override void ShouldFlagANonPrimitiveType() => DoShouldFlagANonPrimitiveType();
37+
38+
[Test]
39+
public override void ShouldGetGenericArguments() => DoShouldGetGenericArguments();
40+
41+
[Test]
42+
public override void ShouldGetEmptyGenericArguments() => DoShouldGetEmptyGenericArguments();
43+
44+
[Test]
45+
public override void ShouldDetermineThatATypeIsDerived() => DoShouldDetermineThatATypeIsDerived();
46+
47+
[Test]
48+
public override void ShouldDetermineThatATypeIsNotDerived() => DoShouldDetermineThatATypeIsNotDerived();
49+
50+
[Test]
51+
public override void ShouldDetermineThatATypeIsAssignable() => DoShouldDetermineThatATypeIsAssignable();
52+
53+
[Test]
54+
public override void ShouldDetermineThatATypeIsNotAssignable() => DoShouldDetermineThatATypeIsNotAssignable();
55+
56+
[Test]
57+
public override void ShouldRetrieveAllInterfaces() => DoShouldRetrieveAllInterfaces();
58+
59+
[Test]
60+
public override void ShouldDetermineThatATypeIsAClosedType() => DoShouldDetermineThatATypeIsAClosedType();
61+
62+
[Test]
63+
public override void ShouldDetermineThatATypeIsNotAClosedType() => DoShouldDetermineThatATypeIsNotAClosedType();
64+
}
65+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using NUnit.Framework;
3+
4+
namespace AgileObjects.NetStandardPolyfills.UnitTests.Net35
5+
{
6+
[TestFixture]
7+
public class WhenRetrievingTypeCodes : TypeCodeTestsBase
8+
{
9+
[Test]
10+
public override void ShouldReturnEmpty() => DoShouldReturnEmpty();
11+
12+
[Test]
13+
public override void ShouldReturnDbNull() => DoShouldReturnDbNull(typeof(DBNull));
14+
15+
[Test]
16+
public override void ShouldReturnBoolean() => DoShouldReturnBoolean();
17+
18+
[Test]
19+
public override void ShouldReturnString() => DoShouldReturnString();
20+
21+
[Test]
22+
public override void ShouldReturnUnderlyingTypeForAnEnum() => DoShouldReturnUnderlyingTypeForAnEnum();
23+
24+
[Test]
25+
public override void ShouldFallbackToObject() => DoShouldFallbackToObject();
26+
}
27+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using NUnit.Framework;
2+
3+
namespace AgileObjects.NetStandardPolyfills.UnitTests.Net35
4+
{
5+
[TestFixture]
6+
public class WhenRetrievingTypeConstructors : ConstructorTestsBase
7+
{
8+
[Test]
9+
public override void ShouldFindPublicInstanceConstructors() => DoShouldFindPublicInstanceConstructors();
10+
11+
[Test]
12+
public override void ShouldFindAnImplicitPublicInstanceConstructor() => DoShouldFindAnImplicitPublicInstanceConstructor();
13+
14+
[Test]
15+
public override void ShouldFindAnExplicitPublicInstanceConstructor() =>
16+
DoShouldFindAnExplicitPublicInstanceConstructor();
17+
18+
[Test]
19+
public override void ShouldFindAPublicInstanceConstructorByParameterTypes() =>
20+
DoShouldFindAPublicInstanceConstructorByParameterTypes();
21+
22+
[Test]
23+
public override void ShouldExcludeAPublicInstanceConstructorByParameterTypes() =>
24+
DoShouldExcludeAPublicInstanceConstructorByParameterTypes();
25+
26+
[Test]
27+
public override void ShouldFindNonPublicInstanceConstructors() => DoShouldFindNonPublicInstanceConstructors();
28+
29+
[Test]
30+
public override void ShouldFindANonPublicInstanceConstructor() => DoShouldFindANonPublicInstanceConstructor();
31+
32+
[Test]
33+
public override void ShouldExcludeANonPublicInstanceConstructor() =>
34+
DoShouldExcludeANonPublicInstanceConstructor();
35+
36+
[Test]
37+
public override void ShouldFindANonPublicInstanceConstructorByParameterTypes() =>
38+
DoShouldFindANonPublicInstanceConstructorByParameterTypes();
39+
40+
[Test]
41+
public override void ShouldExcludeANonPublicInstanceConstructorByParameterTypes() =>
42+
DoShouldExcludeANonPublicInstanceConstructorByParameterTypes();
43+
}
44+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
using NUnit.Framework;
2+
3+
namespace AgileObjects.NetStandardPolyfills.UnitTests.Net35
4+
{
5+
[TestFixture]
6+
public class WhenRetrievingTypeFields : FieldTestsBase
7+
{
8+
[Test]
9+
public override void ShouldRetrievePublicStaticFields() => DoShouldRetrievePublicStaticFields();
10+
11+
[Test]
12+
public override void ShouldRetrieveAPublicStaticFieldByName() => DoShouldRetrieveAPublicStaticFieldByName();
13+
14+
[Test]
15+
public override void ShouldExcludeAPublicStaticFieldByName() => DoShouldExcludeAPublicStaticFieldByName();
16+
17+
[Test]
18+
public override void ShouldRetrieveNonPublicStaticFields() => DoShouldRetrieveNonPublicStaticFields();
19+
20+
[Test]
21+
public override void ShouldRetrieveANonPublicStaticFieldByName() =>
22+
DoShouldRetrieveANonPublicStaticFieldByName();
23+
24+
[Test]
25+
public override void ShouldExcludeANonPublicStaticFieldByName() => DoShouldExcludeANonPublicStaticFieldByName();
26+
27+
[Test]
28+
public override void ShouldRetrievePublicInstanceFields() => DoShouldRetrievePublicInstanceFields();
29+
30+
[Test]
31+
public override void ShouldRetrieveAPublicInstanceFieldByName() => DoShouldRetrieveAPublicInstanceFieldByName();
32+
33+
[Test]
34+
public override void ShouldExcludeAPublicInstanceFieldByName() => DoShouldExcludeAPublicInstanceFieldByName();
35+
36+
[Test]
37+
public override void ShouldRetrieveNonPublicInstanceFields() => DoShouldRetrieveNonPublicInstanceFields();
38+
39+
[Test]
40+
public override void ShouldRetrieveANonPublicInstanceFieldByName() =>
41+
DoShouldRetrieveANonPublicInstanceFieldByName();
42+
43+
[Test]
44+
public override void ShouldExcludeANonPublicInstanceFieldByName() =>
45+
DoShouldExcludeANonPublicInstanceFieldByName();
46+
}
47+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
using NUnit.Framework;
2+
3+
namespace AgileObjects.NetStandardPolyfills.UnitTests.Net35
4+
{
5+
[TestFixture]
6+
public class WhenRetrievingTypeMembers : MemberTestsBase
7+
{
8+
[Test]
9+
public override void ShouldRetrievePublicStaticMembers() => DoShouldRetrievePublicStaticMembers();
10+
11+
[Test]
12+
public override void ShouldRetrievePublicStaticMembersByName() => DoShouldRetrievePublicStaticMembersByName();
13+
14+
[Test]
15+
public override void ShouldExcludePublicStaticMembersByName() => DoShouldExcludePublicStaticMembersByName();
16+
17+
[Test]
18+
public override void ShouldRetrievePublicStaticMemberByName() => DoShouldRetrievePublicStaticMemberByName();
19+
20+
[Test]
21+
public override void ShouldRetrievePublicInstanceMembers() => DoShouldRetrievePublicInstanceMembers();
22+
23+
[Test]
24+
public override void ShouldRetrievePublicInstanceMembersByName() => DoShouldRetrievePublicInstanceMembersByName();
25+
26+
[Test]
27+
public override void ShouldExcludePublicInstanceMembersByName() => DoShouldExcludePublicInstanceMembersByName();
28+
29+
[Test]
30+
public override void ShouldRetrievePublicInstanceMemberByName() => DoShouldRetrievePublicInstanceMemberByName();
31+
32+
[Test]
33+
public override void ShouldRetrieveNonPublicStaticMembers() => DoShouldRetrieveNonPublicStaticMembers();
34+
35+
[Test]
36+
public override void ShouldRetrieveNonPublicStaticMembersByName() => DoShouldRetrieveNonPublicStaticMembersByName();
37+
38+
[Test]
39+
public override void ShouldExcludeNonPublicStaticMembersByName() => DoShouldExcludeNonPublicStaticMembersByName();
40+
41+
[Test]
42+
public override void ShouldRetrieveNonPublicStaticMemberByName() =>
43+
DoShouldRetrieveNonPublicStaticMemberByName();
44+
45+
[Test]
46+
public override void ShouldRetrieveNonPublicInstanceMembers() => DoShouldRetrieveNonPublicInstanceMembers();
47+
48+
[Test]
49+
public override void ShouldRetrieveNonPublicInstanceMembersByName() => DoShouldRetrieveNonPublicInstanceMembersByName();
50+
51+
[Test]
52+
public override void ShouldExcludeNonPublicInstanceMembersByName() => DoShouldExcludeNonPublicInstanceMembersByName();
53+
54+
[Test]
55+
public override void ShouldRetrieveNonPublicInstanceMemberByName() =>
56+
DoShouldRetrieveNonPublicInstanceMemberByName();
57+
}
58+
}

0 commit comments

Comments
 (0)