Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Sqlite-Net
提交
77dee633
S
Sqlite-Net
项目概览
jobily
/
Sqlite-Net
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Sqlite-Net
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
77dee633
编写于
9月 19, 2019
作者:
F
Frank A. Krueger
提交者:
GitHub
9月 19, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #873 from praeclarum/updatetests
Update tests to NUnit 3
上级
fb0706d7
bc26fb49
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
25 deletion
+34
-25
.github/workflows/build.yml
.github/workflows/build.yml
+5
-2
Makefile
Makefile
+7
-7
tests/CreateTableImplicitTest.cs
tests/CreateTableImplicitTest.cs
+12
-7
tests/CreateTableTest.cs
tests/CreateTableTest.cs
+2
-3
tests/SQLite.Tests.csproj
tests/SQLite.Tests.csproj
+7
-5
tests/packages.config
tests/packages.config
+1
-1
未找到文件。
.github/workflows/build.yml
浏览文件 @
77dee633
...
@@ -8,13 +8,16 @@ jobs:
...
@@ -8,13 +8,16 @@ jobs:
runs-on
:
macOS-10.14
runs-on
:
macOS-10.14
steps
:
steps
:
-
uses
:
actions/checkout@v1
-
uses
:
actions/checkout@v1
-
name
:
Restore NuGets
run
:
nuget restore SQLite.sln
-
name
:
Build and Test
-
name
:
Build and Test
run
:
make test
run
:
make test
-
name
:
Make
nug
et
-
name
:
Make
NuG
et
run
:
|
run
:
|
make nuget
make nuget
mkdir PackageOut
mkdir PackageOut
...
...
Makefile
浏览文件 @
77dee633
...
@@ -3,15 +3,15 @@ SRC=src/SQLite.cs src/SQLiteAsync.cs
...
@@ -3,15 +3,15 @@ SRC=src/SQLite.cs src/SQLiteAsync.cs
all
:
test nuget
all
:
test nuget
test
:
tests/bin/
Debug/SQLite.Tests.dll tests/ApiDiff/bin/Debug
/ApiDiff.exe
test
:
tests/bin/
Release/SQLite.Tests.dll tests/ApiDiff/bin/Release
/ApiDiff.exe
mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe tests/bin/
Debug
/SQLite.Tests.dll
mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe tests/bin/
Release
/SQLite.Tests.dll
mono tests/ApiDiff/bin/
Debug
/ApiDiff.exe
mono tests/ApiDiff/bin/
Release
/ApiDiff.exe
tests/bin/
Debug
/SQLite.Tests.dll
:
tests/SQLite.Tests.csproj $(SRC)
tests/bin/
Release
/SQLite.Tests.dll
:
tests/SQLite.Tests.csproj $(SRC)
msbuild tests/SQLite.Tests.csproj
msbuild
/p:Configuration
=
Release
tests/SQLite.Tests.csproj
tests/ApiDiff/bin/
Debug
/ApiDiff.exe
:
tests/ApiDiff/ApiDiff.csproj $(SRC)
tests/ApiDiff/bin/
Release
/ApiDiff.exe
:
tests/ApiDiff/ApiDiff.csproj $(SRC)
msbuild tests/ApiDiff/ApiDiff.csproj
msbuild
/p:Configuration
=
Release
tests/ApiDiff/ApiDiff.csproj
nuget
:
srcnuget pclnuget basenuget sqlciphernuget
nuget
:
srcnuget pclnuget basenuget sqlciphernuget
...
...
tests/CreateTableImplicitTest.cs
浏览文件 @
77dee633
...
@@ -25,7 +25,14 @@ namespace SQLite.Tests
...
@@ -25,7 +25,14 @@ namespace SQLite.Tests
public
int
IndexedId
{
get
;
set
;
}
public
int
IndexedId
{
get
;
set
;
}
}
}
class
PkAttribute
class
NoAttributesNoOptions
{
public
int
Id
{
get
;
set
;
}
public
string
AColumn
{
get
;
set
;
}
public
int
IndexedId
{
get
;
set
;
}
}
class
PkAttribute
{
{
[
PrimaryKey
]
[
PrimaryKey
]
public
int
Id
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
...
@@ -45,22 +52,20 @@ namespace SQLite.Tests
...
@@ -45,22 +52,20 @@ namespace SQLite.Tests
Assert
.
AreEqual
(
2
,
item
.
Id
);
Assert
.
AreEqual
(
2
,
item
.
Id
);
}
}
[
Test
,
ExpectedException
(
typeof
(
AssertionException
))
]
[
Test
]
public
void
WithoutImplicitMapping
()
public
void
WithoutImplicitMapping
()
{
{
var
db
=
new
TestDb
();
var
db
=
new
TestDb
();
db
.
CreateTable
<
NoAttributes
>();
db
.
CreateTable
<
NoAttributes
NoOptions
>();
var
mapping
=
db
.
GetMapping
<
NoAttributes
>
();
var
mapping
=
db
.
GetMapping
<
NoAttributes
NoOptions
>
();
Assert
.
IsNull
(
mapping
.
PK
);
Assert
.
IsNull
(
mapping
.
PK
,
"Should not be a key"
);
var
column
=
mapping
.
Columns
[
2
];
var
column
=
mapping
.
Columns
[
2
];
Assert
.
AreEqual
(
"IndexedId"
,
column
.
Name
);
Assert
.
AreEqual
(
"IndexedId"
,
column
.
Name
);
Assert
.
IsFalse
(
column
.
Indices
.
Any
());
Assert
.
IsFalse
(
column
.
Indices
.
Any
());
CheckPK
(
db
);
}
}
[
Test
]
[
Test
]
...
...
tests/CreateTableTest.cs
浏览文件 @
77dee633
...
@@ -20,12 +20,11 @@ namespace SQLite.Tests
...
@@ -20,12 +20,11 @@ namespace SQLite.Tests
{
{
}
}
[
Test
,
ExpectedException
]
[
Test
]
public
void
CreateTypeWithNoProps
()
public
void
CreateTypeWithNoProps
()
{
{
var
db
=
new
TestDb
();
var
db
=
new
TestDb
();
Assert
.
Throws
<
Exception
>
(()
=>
db
.
CreateTable
<
NoPropObject
>
());
db
.
CreateTable
<
NoPropObject
>
();
}
}
[
Test
]
[
Test
]
...
...
tests/SQLite.Tests.csproj
浏览文件 @
77dee633
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets=
"Build"
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Project
DefaultTargets=
"Build"
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"..\packages\NUnit.3.12.0\build\NUnit.props"
Condition=
"Exists('..\packages\NUnit.3.12.0\build\NUnit.props')"
/>
<PropertyGroup>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
...
@@ -30,18 +31,19 @@
...
@@ -30,18 +31,19 @@
<ConsolePause>
False
</ConsolePause>
<ConsolePause>
False
</ConsolePause>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"
>
<HintPath>
..\packages\NUnit.2.6.4\lib\nunit.framework.dll
</HintPath>
<Private>
True
</Private>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"Microsoft.VisualBasic"
/>
<Reference
Include=
"Microsoft.VisualBasic"
/>
<Reference
Include=
"nunit.framework"
>
<HintPath>
..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll
</HintPath>
</Reference>
</ItemGroup>
</ItemGroup>
<Import
Project=
"$(MSBuildBinPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"$(MSBuildBinPath)\Microsoft.CSharp.targets"
/>
<ItemGroup>
<ItemGroup>
<Compile
Include=
"BooleanTest.cs"
/>
<Compile
Include=
"BooleanTest.cs"
/>
<Compile
Include=
"..\src\SQLite.cs"
/>
<Compile
Include=
"..\src\SQLite.cs"
>
<Link>
SQLite.cs
</Link>
</Compile>
<Compile
Include=
"ByteArrayTest.cs"
/>
<Compile
Include=
"ByteArrayTest.cs"
/>
<Compile
Include=
"ConcurrencyTest.cs"
/>
<Compile
Include=
"ConcurrencyTest.cs"
/>
<Compile
Include=
"EnumCacheTest.cs"
/>
<Compile
Include=
"EnumCacheTest.cs"
/>
...
...
tests/packages.config
浏览文件 @
77dee633
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
packages
>
<
package
id
=
"NUnit"
version
=
"
2.6.4
"
targetFramework
=
"net45"
/>
<
package
id
=
"NUnit"
version
=
"
3.12.0
"
targetFramework
=
"net45"
/>
<
package
id
=
"NUnit.Console"
version
=
"3.10.0"
targetFramework
=
"net45"
/>
<
package
id
=
"NUnit.Console"
version
=
"3.10.0"
targetFramework
=
"net45"
/>
<
package
id
=
"NUnit.ConsoleRunner"
version
=
"3.10.0"
targetFramework
=
"net45"
/>
<
package
id
=
"NUnit.ConsoleRunner"
version
=
"3.10.0"
targetFramework
=
"net45"
/>
<
package
id
=
"NUnit.Extension.NUnitProjectLoader"
version
=
"3.6.0"
targetFramework
=
"net45"
/>
<
package
id
=
"NUnit.Extension.NUnitProjectLoader"
version
=
"3.6.0"
targetFramework
=
"net45"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录