Skip to content

Commit fb086c1

Browse files
committed
NH-3807 - Add VisualBasic test project.
1 parent 7f1994c commit fb086c1

File tree

6 files changed

+53
-177
lines changed

6 files changed

+53
-177
lines changed

src/NHibernate.Test.VisualBasic/AssemblyInfo.vb

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,13 @@
11
Imports System
22
Imports System.Reflection
33
Imports System.Runtime.InteropServices
4-
5-
' General Information about an assembly is controlled through the following
6-
' set of attributes. Change these attribute values to modify the information
7-
' associated with an assembly.
8-
9-
' Review the values of the assembly attributes
10-
11-
<Assembly: AssemblyTitle("NHibernate.Test.VisualBasic")>
12-
<Assembly: AssemblyDescription("The Visual Basic Unit Tests for NHibernate.")>
13-
<Assembly: AssemblyCompany("Microsoft")>
14-
<Assembly: AssemblyProduct("NHibernate.Test.VisualBasic")>
15-
<Assembly: AssemblyCopyright("Copyright © Microsoft 2011")>
16-
<Assembly: AssemblyTrademark("")>
4+
Imports NUnit.Framework
175

186
<Assembly: ComVisible(False)>
197

208
'The following GUID is for the ID of the typelib if this project is exposed to COM
21-
<Assembly: Guid("f3bf0316-dff3-4f0c-918a-1f278d626d85")>
9+
<Assembly: Guid("f3bf0316-dff3-4f0c-918a-1f278d626d85")>
2210

23-
' Version information for an assembly consists of the following four values:
24-
'
25-
' Major Version
26-
' Minor Version
27-
' Build Number
28-
' Revision
29-
'
30-
' You can specify all the values or you can default the Build and Revision Numbers
31-
' by using the '*' as shown below:
32-
' <Assembly: AssemblyVersion("1.0.*")>
11+
<Assembly: CLSCompliant(False)>
3312

34-
<Assembly: CLSCompliant(False)>
13+
<Assembly: LevelOfParallelism(0)>
Lines changed: 32 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,50 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
33
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>
7-
</ProductVersion>
8-
<SchemaVersion>
9-
</SchemaVersion>
10-
<ProjectGuid>{7C2EF610-BCA0-4D1F-898A-DE9908E4970C}</ProjectGuid>
11-
<OutputType>Library</OutputType>
12-
<RootNamespace>NHibernate.Test.VisualBasic</RootNamespace>
13-
<AssemblyName>NHibernate.Test.VisualBasic</AssemblyName>
14-
<FileAlignment>512</FileAlignment>
15-
<MyType>Windows</MyType>
16-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
17-
<TargetFrameworkProfile />
18-
<StartAction>Program</StartAction>
19-
<StartProgram>$(MSBuildProjectDirectory)\..\..\Tools\nunit\nunit-x86.exe</StartProgram>
20-
<StartArguments>NHibernate.Test.VisualBasic.dll</StartArguments>
21-
</PropertyGroup>
22-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
23-
<DebugSymbols>true</DebugSymbols>
24-
<DebugType>full</DebugType>
25-
<DefineDebug>true</DefineDebug>
26-
<DefineTrace>true</DefineTrace>
27-
<OutputPath>bin\Debug\</OutputPath>
28-
<DocumentationFile>NHibernate.Test.VisualBasic.xml</DocumentationFile>
29-
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
30-
<Prefer32Bit>false</Prefer32Bit>
31-
</PropertyGroup>
32-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
33-
<DebugType>pdbonly</DebugType>
34-
<DefineDebug>false</DefineDebug>
35-
<DefineTrace>true</DefineTrace>
36-
<Optimize>true</Optimize>
37-
<OutputPath>bin\Release\</OutputPath>
38-
<DocumentationFile>NHibernate.Test.VisualBasic.xml</DocumentationFile>
39-
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
40-
<Prefer32Bit>false</Prefer32Bit>
41-
</PropertyGroup>
42-
<PropertyGroup>
43-
<OptionExplicit>On</OptionExplicit>
44-
</PropertyGroup>
45-
<PropertyGroup>
46-
<OptionCompare>Binary</OptionCompare>
47-
</PropertyGroup>
48-
<PropertyGroup>
49-
<OptionStrict>Off</OptionStrict>
50-
</PropertyGroup>
51-
<PropertyGroup>
52-
<OptionInfer>On</OptionInfer>
4+
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
<Description>The Visual Basic Unit Tests for NHibernate.</Description>
6+
<!--<TargetFramework>net461</TargetFramework>-->
7+
8+
<IsPackable>false</IsPackable>
539
</PropertyGroup>
10+
5411
<ItemGroup>
55-
<Reference Include="nunit.framework, Version=3.6.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
56-
<HintPath>..\packages\NUnit.3.6.0\lib\net45\nunit.framework.dll</HintPath>
57-
</Reference>
58-
<Reference Include="System" />
59-
<Reference Include="System.Data" />
60-
<Reference Include="System.Xml" />
61-
<Reference Include="System.Core" />
62-
<Reference Include="System.Xml.Linq" />
63-
<Reference Include="System.Data.DataSetExtensions" />
12+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0-preview-20170628-02" />
13+
<PackageReference Include="NUnit" Version="3.7.1" />
14+
<PackageReference Include="NUnit3TestAdapter" Version="3.8.0-alpha1" />
6415
</ItemGroup>
16+
6517
<ItemGroup>
66-
<Import Include="Microsoft.VisualBasic" />
67-
<Import Include="System" />
68-
<Import Include="System.Collections" />
69-
<Import Include="System.Collections.Generic" />
70-
<Import Include="System.Data" />
71-
<Import Include="System.Diagnostics" />
72-
<Import Include="System.Linq" />
73-
<Import Include="System.Xml.Linq" />
18+
<Compile Remove="Issues\NH3302\**" /> <!--"Like" not supported in .netcore, not fixed yet in .net framework-->
7419
</ItemGroup>
75-
<ItemGroup>
76-
<Compile Include="..\SharedAssemblyInfo.vb">
77-
<Link>SharedAssemblyInfo.vb</Link>
78-
</Compile>
79-
<Compile Include="AssemblyInfo.vb" />
80-
<Compile Include="Issues\NH2966\Client.vb" />
81-
<Compile Include="Issues\NH2966\Fixture.vb" />
82-
<Compile Include="Issues\NH3302\Entity.vb" />
83-
<Compile Include="Issues\NH3302\Fixture.vb" />
84-
<Compile Include="Issues\NH2963\Entity.vb" />
85-
<Compile Include="Issues\NH2963\Fixture.vb" />
86-
<Compile Include="Issues\NH0000\Entity.vb" />
87-
<Compile Include="Issues\NH0000\Fixture.vb" />
88-
<Compile Include="Issues\IssueTestCase.vb" />
89-
<Compile Include="Issues\NH2545\Fixture.vb" />
90-
<Compile Include="Issues\NH2545\Entity.vb" />
91-
<Compile Include="Issues\NH2966\Order.vb" />
92-
<Compile Include="My Project\AssemblyInfo.vb" />
93-
<Compile Include="My Project\Application.Designer.vb">
94-
<AutoGen>True</AutoGen>
95-
<DependentUpon>Application.myapp</DependentUpon>
96-
</Compile>
97-
<Compile Include="My Project\Resources.Designer.vb">
98-
<AutoGen>True</AutoGen>
99-
<DesignTime>True</DesignTime>
100-
<DependentUpon>Resources.resx</DependentUpon>
101-
</Compile>
102-
<Compile Include="My Project\Settings.Designer.vb">
103-
<AutoGen>True</AutoGen>
104-
<DependentUpon>Settings.settings</DependentUpon>
105-
<DesignTimeSharedInput>True</DesignTimeSharedInput>
106-
</Compile>
20+
21+
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
10722
</ItemGroup>
108-
<ItemGroup>
109-
<EmbeddedResource Include="My Project\Resources.resx">
110-
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
111-
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
112-
<CustomToolNamespace>My.Resources</CustomToolNamespace>
113-
<SubType>Designer</SubType>
114-
</EmbeddedResource>
23+
24+
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
11525
</ItemGroup>
26+
11627
<ItemGroup>
117-
<None Include="..\NHibernate.Test\App.config">
118-
<Link>App.config</Link>
119-
<SubType>Designer</SubType>
120-
</None>
121-
<None Include="My Project\Application.myapp">
122-
<Generator>MyApplicationCodeGenerator</Generator>
123-
<LastGenOutput>Application.Designer.vb</LastGenOutput>
124-
</None>
125-
<None Include="My Project\Settings.settings">
126-
<Generator>SettingsSingleFileGenerator</Generator>
127-
<CustomToolNamespace>My</CustomToolNamespace>
128-
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
129-
</None>
130-
<None Include="packages.config" />
28+
<None Remove="**\*.hbm.xml" />
13129
</ItemGroup>
30+
13231
<ItemGroup>
133-
<ProjectReference Include="..\NHibernate.Test\NHibernate.Test.csproj">
134-
<Project>{7AEE5B37-C552-4E59-9B6F-88755BCB5070}</Project>
135-
<Name>NHibernate.Test</Name>
136-
</ProjectReference>
137-
<ProjectReference Include="..\NHibernate\NHibernate.csproj">
138-
<Project>{5909BFE7-93CF-4E5F-BE22-6293368AF01D}</Project>
139-
<Name>NHibernate</Name>
140-
</ProjectReference>
32+
<EmbeddedResource Include="**\*.hbm.xml" />
14133
</ItemGroup>
34+
14235
<ItemGroup>
143-
<EmbeddedResource Include="Issues\NH2545\Issues.NH2545.Mappings.hbm.xml" />
36+
<None Include="..\NHibernate.Test\App.config" Link="App.config" />
14437
</ItemGroup>
38+
14539
<ItemGroup>
146-
<EmbeddedResource Include="Issues\NH0000\Issues.NH0000.Mappings.hbm.xml" />
40+
<ProjectReference Include="..\NHibernate\NHibernate.csproj" />
41+
<ProjectReference Include="..\NHibernate.Test\NHibernate.Test.csproj" />
14742
</ItemGroup>
43+
14844
<ItemGroup>
149-
<EmbeddedResource Include="Issues\NH2966\Issues.NH2966.Mappings.hbm.xml" />
150-
<EmbeddedResource Include="Issues\NH3302\Issues.NH3302.Mappings.hbm.xml" />
45+
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
15146
</ItemGroup>
152-
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
153-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
154-
Other similar extension points exist, see Microsoft.Common.targets.
155-
<Target Name="BeforeBuild">
156-
</Target>
157-
<Target Name="AfterBuild">
158-
</Target>
159-
-->
160-
</Project>
47+
48+
<Import Project="../SharedAssemblyInfo.targets" />
49+
50+
</Project>

src/NHibernate.Test.VisualBasic/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/NHibernate.netstandard.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHibernate.Test", "NHiberna
3333
EndProject
3434
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NHibernate.TestDatabaseSetup", "NHibernate.TestDatabaseSetup\NHibernate.TestDatabaseSetup.csproj", "{A593928E-4D00-4217-B80D-2BA0D3EEEC7E}"
3535
EndProject
36+
Project("{778DAE3C-4631-46EA-AA77-85C1314464D9}") = "NHibernate.Test.VisualBasic", "NHibernate.Test.VisualBasic\NHibernate.Test.VisualBasic.vbproj", "{975BACB0-F23B-4E3C-B2A2-920FDB75BCCC}"
37+
EndProject
3638
Global
3739
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3840
Debug|Any CPU = Debug|Any CPU
@@ -95,6 +97,10 @@ Global
9597
{A593928E-4D00-4217-B80D-2BA0D3EEEC7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
9698
{A593928E-4D00-4217-B80D-2BA0D3EEEC7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
9799
{A593928E-4D00-4217-B80D-2BA0D3EEEC7E}.Release|Any CPU.Build.0 = Release|Any CPU
100+
{975BACB0-F23B-4E3C-B2A2-920FDB75BCCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
101+
{975BACB0-F23B-4E3C-B2A2-920FDB75BCCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
102+
{975BACB0-F23B-4E3C-B2A2-920FDB75BCCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
103+
{975BACB0-F23B-4E3C-B2A2-920FDB75BCCC}.Release|Any CPU.Build.0 = Release|Any CPU
98104
EndGlobalSection
99105
GlobalSection(SolutionProperties) = preSolution
100106
HideSolutionNode = FALSE

src/NHibernate/Linq/Functions/CompareGenerator.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,17 @@ internal static bool IsCompareMethod(MethodInfo methodInfo)
4444
return true;
4545

4646
// This is .Net 4 only, and in the System.Data.Services assembly, which we don't depend directly on.
47-
return methodInfo != null && methodInfo.Name == "Compare" &&
47+
if (methodInfo != null && methodInfo.Name == "Compare" &&
4848
methodInfo.DeclaringType != null &&
49-
methodInfo.DeclaringType.FullName == "System.Data.Services.Providers.DataServiceProviderMethods";
49+
methodInfo.DeclaringType.FullName == "System.Data.Services.Providers.DataServiceProviderMethods")
50+
return true;
51+
52+
if (methodInfo != null && methodInfo.Name == "CompareString" &&
53+
methodInfo.DeclaringType != null &&
54+
(methodInfo.DeclaringType.FullName == "Microsoft.VisualBasic.CompilerServices.Operators" || methodInfo.DeclaringType.FullName == "Microsoft.VisualBasic.CompilerServices.EmbeddedOperators"))
55+
return true;
56+
57+
return false;
5058
}
5159

5260

@@ -100,4 +108,4 @@ public IHqlGeneratorForMethod GetMethodGenerator(MethodInfo method)
100108

101109
#endregion
102110
}
103-
}
111+
}

0 commit comments

Comments
 (0)