Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit efc53dd

Browse files
committed
Add VB .NET test project
1 parent 8fca813 commit efc53dd

File tree

7 files changed

+262
-1
lines changed

7 files changed

+262
-1
lines changed

src/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
bin/
22
obj/
3-
_ReSharper.ServiceStack.OrmLite/
3+
_ReSharper.ServiceStack.OrmLite/
4+
packages/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Imports NUnit.Framework
2+
3+
Public Class Table
4+
Public Property Id As Integer
5+
public Property IsActive As Boolean
6+
public Property IsDeleted As Boolean
7+
End Class
8+
9+
<TestFixture> _
10+
Public Class VbTests
11+
12+
<Test> _
13+
Public Sub Test_and_Expression()
14+
15+
OrmLiteUtils.PrintSql()
16+
17+
Dim dbFactory as New OrmLiteConnectionFactory(":memory:", SqliteDialect.Provider)
18+
Using db As IDbConnection = dbFactory.Open()
19+
20+
db.CreateTable(Of Table)
21+
22+
Dim q = db.From(Of Table) _
23+
.Where(Function(t) t.IsDeleted = False And t.IsActive = False)
24+
25+
Dim results = db.Select(q)
26+
27+
End Using
28+
29+
End Sub
30+
31+
End Class

tests/ServiceStack.OrmLite.Tests.Vb/My Project/Application.Designer.vb

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3+
<MySubMain>false</MySubMain>
4+
<SingleInstance>false</SingleInstance>
5+
<ShutdownMode>0</ShutdownMode>
6+
<EnableVisualStyles>true</EnableVisualStyles>
7+
<AuthenticationMode>0</AuthenticationMode>
8+
<ApplicationType>1</ApplicationType>
9+
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
10+
</MyApplicationData>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Imports System
2+
Imports System.Reflection
3+
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("ServiceStack.OrmLite.Tests.Vb")>
12+
<Assembly: AssemblyDescription("")>
13+
<Assembly: AssemblyCompany("")>
14+
<Assembly: AssemblyProduct("ServiceStack.OrmLite.Tests.Vb")>
15+
<Assembly: AssemblyCopyright("Copyright © 2019")>
16+
<Assembly: AssemblyTrademark("")>
17+
18+
<Assembly: ComVisible(False)>
19+
20+
'The following GUID is for the ID of the typelib if this project is exposed to COM
21+
<Assembly: Guid("12BC7DB2-8802-42C2-92CF-912389241584")>
22+
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.*")>
33+
34+
<Assembly: AssemblyVersion("1.0.0.0")>
35+
<Assembly: AssemblyFileVersion("1.0.0.0")>
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\..\src\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\..\src\packages\NUnit.3.12.0\build\NUnit.props')" />
4+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
<PropertyGroup>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{12BC7DB2-8802-42C2-92CF-912389241584}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<RootNamespace>ServiceStack.OrmLite.Tests.Vb</RootNamespace>
11+
<AssemblyName>ServiceStack.OrmLite.Tests.Vb</AssemblyName>
12+
<FileAlignment>512</FileAlignment>
13+
<MyType>Windows</MyType>
14+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<DefineDebug>true</DefineDebug>
20+
<DefineTrace>true</DefineTrace>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DocumentationFile>ServiceStack.OrmLite.Tests.Vb.xml</DocumentationFile>
23+
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<DefineDebug>false</DefineDebug>
28+
<DefineTrace>true</DefineTrace>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DocumentationFile>ServiceStack.OrmLite.Tests.Vb.xml</DocumentationFile>
32+
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
33+
</PropertyGroup>
34+
<PropertyGroup>
35+
<OptionExplicit>On</OptionExplicit>
36+
</PropertyGroup>
37+
<PropertyGroup>
38+
<OptionCompare>Binary</OptionCompare>
39+
</PropertyGroup>
40+
<PropertyGroup>
41+
<OptionStrict>Off</OptionStrict>
42+
</PropertyGroup>
43+
<PropertyGroup>
44+
<OptionInfer>On</OptionInfer>
45+
</PropertyGroup>
46+
<ItemGroup>
47+
<Reference Include="Microsoft.CSharp" />
48+
<Reference Include="mscorlib" />
49+
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb">
50+
<HintPath>..\..\src\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
51+
<Private>True</Private>
52+
</Reference>
53+
<Reference Include="ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587">
54+
<HintPath>..\..\src\packages\ServiceStack.5.6.1\lib\net45\ServiceStack.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="ServiceStack.Client, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587">
58+
<HintPath>..\..\src\packages\ServiceStack.Client.5.6.1\lib\net45\ServiceStack.Client.dll</HintPath>
59+
<Private>True</Private>
60+
</Reference>
61+
<Reference Include="ServiceStack.Common, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587">
62+
<HintPath>..\..\src\packages\ServiceStack.Common.5.6.1\lib\net45\ServiceStack.Common.dll</HintPath>
63+
<Private>True</Private>
64+
</Reference>
65+
<Reference Include="ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587">
66+
<HintPath>..\..\src\packages\ServiceStack.Interfaces.5.6.1\lib\net45\ServiceStack.Interfaces.dll</HintPath>
67+
<Private>True</Private>
68+
</Reference>
69+
<Reference Include="ServiceStack.Text, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587">
70+
<HintPath>..\..\src\packages\ServiceStack.Text.5.6.1\lib\net45\ServiceStack.Text.dll</HintPath>
71+
<Private>True</Private>
72+
</Reference>
73+
<Reference Include="System" />
74+
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
75+
<HintPath>..\..\src\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
76+
<Private>True</Private>
77+
</Reference>
78+
<Reference Include="System.Configuration" />
79+
<Reference Include="System.Data" />
80+
<Reference Include="System.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139">
81+
<HintPath>..\..\src\packages\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll</HintPath>
82+
<Private>True</Private>
83+
</Reference>
84+
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
85+
<HintPath>..\..\src\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
86+
<Private>True</Private>
87+
</Reference>
88+
<Reference Include="System.Net" />
89+
<Reference Include="System.Numerics" />
90+
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
91+
<HintPath>..\..\src\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
92+
<Private>True</Private>
93+
</Reference>
94+
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
95+
<HintPath>..\..\src\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
96+
<Private>True</Private>
97+
</Reference>
98+
<Reference Include="System.Runtime.Serialization" />
99+
<Reference Include="System.Runtime.Serialization.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
100+
<HintPath>..\..\src\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
101+
<Private>True</Private>
102+
</Reference>
103+
<Reference Include="System.ServiceModel" />
104+
<Reference Include="System.Web" />
105+
<Reference Include="System.Xml" />
106+
<Reference Include="System.Core" />
107+
<Reference Include="System.Xml.Linq" />
108+
<Reference Include="System.Data.DataSetExtensions" />
109+
<Reference Include="System.Net.Http" />
110+
</ItemGroup>
111+
<ItemGroup>
112+
<Import Include="Microsoft.VisualBasic" />
113+
<Import Include="System" />
114+
<Import Include="System.Collections" />
115+
<Import Include="System.Collections.Generic" />
116+
<Import Include="System.Data" />
117+
<Import Include="System.Diagnostics" />
118+
<Import Include="System.Linq" />
119+
<Import Include="System.Xml.Linq" />
120+
<Import Include="System.Threading.Tasks" />
121+
</ItemGroup>
122+
<ItemGroup>
123+
<Compile Include="Class1.vb" />
124+
<Compile Include="My Project\AssemblyInfo.vb" />
125+
<Compile Include="My Project\Application.Designer.vb">
126+
<AutoGen>True</AutoGen>
127+
<DependentUpon>Application.myapp</DependentUpon>
128+
</Compile>
129+
</ItemGroup>
130+
<ItemGroup>
131+
<None Include="My Project\Application.myapp">
132+
<Generator>MyApplicationCodeGenerator</Generator>
133+
<LastGenOutput>Application.Designer.vb</LastGenOutput>
134+
</None>
135+
<None Include="packages.config" />
136+
</ItemGroup>
137+
<ItemGroup>
138+
<ProjectReference Include="..\..\src\ServiceStack.OrmLite.Sqlite\ServiceStack.OrmLite.Sqlite.csproj">
139+
<Project>{cf68a37d-d071-469d-ae04-68594cb95382}</Project>
140+
<Name>ServiceStack.OrmLite.Sqlite</Name>
141+
</ProjectReference>
142+
<ProjectReference Include="..\..\src\ServiceStack.OrmLite\ServiceStack.OrmLite.csproj">
143+
<Project>{96179ac6-f6f1-40c3-9fdd-4f6582f54c5c}</Project>
144+
<Name>ServiceStack.OrmLite</Name>
145+
</ProjectReference>
146+
</ItemGroup>
147+
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
148+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
149+
<PropertyGroup>
150+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
151+
</PropertyGroup>
152+
<Error Condition="!Exists('..\..\src\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\src\packages\NUnit.3.12.0\build\NUnit.props'))" />
153+
<Error Condition="!Exists('..\..\src\packages\System.Data.SQLite.Core.1.0.111.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\src\packages\System.Data.SQLite.Core.1.0.111.0\build\net46\System.Data.SQLite.Core.targets'))" />
154+
</Target>
155+
<Import Project="..\..\src\packages\System.Data.SQLite.Core.1.0.111.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\src\packages\System.Data.SQLite.Core.1.0.111.0\build\net46\System.Data.SQLite.Core.targets')" />
156+
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="NUnit" version="3.12.0" targetFramework="net472" />
4+
<package id="ServiceStack" version="5.6.1" targetFramework="net472" />
5+
<package id="ServiceStack.Client" version="5.6.1" targetFramework="net472" />
6+
<package id="ServiceStack.Common" version="5.6.1" targetFramework="net472" />
7+
<package id="ServiceStack.Interfaces" version="5.6.1" targetFramework="net472" />
8+
<package id="ServiceStack.Text" version="5.6.1" targetFramework="net472" />
9+
<package id="System.Buffers" version="4.4.0" targetFramework="net472" />
10+
<package id="System.Data.SQLite.Core" version="1.0.111.0" targetFramework="net472" />
11+
<package id="System.Memory" version="4.5.3" targetFramework="net472" />
12+
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net472" />
13+
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
14+
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net472" />
15+
</packages>

0 commit comments

Comments
 (0)