DeveelDB
20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
deveeldb.git
src
deveeldb.linq.nunit
Deveel.Data.Linq
ContextQueryTests.cs
Go to the documentation of this file.
1
using
System
;
2
3
using
Deveel
.
Data
.
Mapping
;
4
5
using
NUnit
.Framework;
6
7
namespace
Deveel
.Data.Linq {
8
[TestFixture]
9
public
class
ContextQueryTests
:
ContextBasedTest
{
10
[Test]
11
public
void
CreateContext
() {
12
QueryContext
context = null;
13
Assert.DoesNotThrow(() => context =
new
EmptyTestQueryContext
(
Query
));
14
Assert.IsNotNull(context);
15
}
16
17
[Test]
18
public
void
RequestTableNotConfigured
() {
19
var context =
new
EmptyTestQueryContext
(
Query
);
20
Assert.DoesNotThrow(() => context.Table<
EmptyTestType
>());
21
}
22
23
[Test]
24
public
void
RequestEntryNotConfigured
() {
25
var context =
new
EmptyTestQueryContext
(
Query
);
26
Assert.Throws<
QueryException
>(() => context.Table<
EmptyTestType
>().FindById(1));
27
}
28
29
class
EmptyTestType
{
30
}
31
32
class
EmptyTestQueryContext
:
QueryContext
{
33
public
EmptyTestQueryContext
(
IQuery
context)
34
: base(context) {
35
}
36
37
protected
override
void
OnBuildMap
(
MappingContext
mappingContext) {
38
39
}
40
}
41
}
42
}
Deveel
System
Definition:
NonSerializedAttribute.cs:3
Deveel.Data.Mapping
Definition:
ColumnAttribute.cs:6
Deveel.Data.Query
Definition:
Query.cs:26
Deveel.Data.Linq.ContextQueryTests.RequestEntryNotConfigured
void RequestEntryNotConfigured()
Definition:
ContextQueryTests.cs:24
Deveel.Data.IQuery
Definition:
IQuery.cs:20
Deveel.Data.Linq.ContextQueryTests.EmptyTestQueryContext.OnBuildMap
override void OnBuildMap(MappingContext mappingContext)
Definition:
ContextQueryTests.cs:37
NUnit
Deveel.Data.Linq.ContextQueryTests.CreateContext
void CreateContext()
Definition:
ContextQueryTests.cs:11
Deveel.Data.Linq.ContextQueryTests.EmptyTestQueryContext.EmptyTestQueryContext
EmptyTestQueryContext(IQuery context)
Definition:
ContextQueryTests.cs:33
Deveel.Data.Mapping.MappingContext
Definition:
MappingContext.cs:10
Deveel.Data.Linq.ContextQueryTests
Definition:
ContextQueryTests.cs:9
Deveel.Data.ContextBasedTest
Definition:
ContextBasedTest.cs:25
Deveel.Data
Definition:
ActiveSessionList.cs:22
Deveel.Data.Linq.ContextQueryTests.EmptyTestType
Definition:
ContextQueryTests.cs:29
Deveel.Data.Linq.QueryContext
Definition:
QueryContext.cs:9
Deveel.Data.Linq.ContextQueryTests.RequestTableNotConfigured
void RequestTableNotConfigured()
Definition:
ContextQueryTests.cs:18
Deveel.Data.Linq.QueryException
Definition:
QueryException.cs:4
Deveel.Data.Linq.ContextQueryTests.EmptyTestQueryContext
Definition:
ContextQueryTests.cs:32
Generated by
1.8.10