forked from FirebirdSQL/NETProvider
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNorthwindMiscellaneousQueryFbTest.cs
More file actions
173 lines (149 loc) · 6.1 KB
/
NorthwindMiscellaneousQueryFbTest.cs
File metadata and controls
173 lines (149 loc) · 6.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
* The contents of this file are subject to the Initial
* Developer's Public License Version 1.0 (the "License");
* you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* https://github.com/FirebirdSQL/NETProvider/raw/master/license.txt.
*
* Software distributed under the License is distributed on
* an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
* express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* All Rights Reserved.
*/
//$Authors = Jiri Cincura (jiri@cincura.net)
using System;
using System.Threading.Tasks;
using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Helpers;
using FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.TestUtilities;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.TestUtilities;
using Xunit;
namespace FirebirdSql.EntityFrameworkCore.Firebird.FunctionalTests.Query;
public class NorthwindMiscellaneousQueryFbTest : NorthwindMiscellaneousQueryRelationalTestBase<NorthwindQueryFbFixture<NoopModelCustomizer>>
{
private readonly NorthwindQueryFbFixture<NoopModelCustomizer> _fixture;
public NorthwindMiscellaneousQueryFbTest(NorthwindQueryFbFixture<NoopModelCustomizer> fixture)
: base(fixture)
{
_fixture = fixture;
}
[Theory]
[MemberData(nameof(IsAsyncData))]
public override Task Select_DTO_constructor_distinct_with_collection_projection_translated_to_server_with_binding_after_client_eval(bool async)
{
var fbTestStore = (FbTestStore)Fixture.TestStore;
if (fbTestStore.ServerLessThan4())
return Task.CompletedTask;
return base.Select_DTO_constructor_distinct_with_collection_projection_translated_to_server_with_binding_after_client_eval(async);
}
[Theory]
[MemberData(nameof(IsAsyncData))]
public override async Task Client_code_unknown_method(bool async)
{
await AssertTranslationFailed(() => base.Client_code_unknown_method(async));
}
[Theory]
[MemberData(nameof(IsAsyncData))]
public override async Task Client_code_using_instance_in_anonymous_type(bool async)
{
await Assert.ThrowsAsync<InvalidOperationException>(() => base.Client_code_using_instance_in_anonymous_type(async));
}
[Theory]
[MemberData(nameof(IsAsyncData))]
public override async Task Client_code_using_instance_in_static_method(bool async)
{
await Assert.ThrowsAsync<InvalidOperationException>(() => base.Client_code_using_instance_in_static_method(async));
}
[Theory]
[MemberData(nameof(IsAsyncData))]
public override async Task Client_code_using_instance_method_throws(bool async)
{
await Assert.ThrowsAsync<InvalidOperationException>(() => base.Client_code_using_instance_method_throws(async));
}
[Theory]
[MemberData(nameof(IsAsyncData))]
public override async Task Entity_equality_through_subquery_composite_key(bool async)
{
await Assert.ThrowsAsync<InvalidOperationException>(() => base.Entity_equality_through_subquery_composite_key(async));
}
[Theory]
[MemberData(nameof(IsAsyncData))]
public override async Task Max_on_empty_sequence_throws(bool async)
{
await Assert.ThrowsAsync<InvalidOperationException>(() => base.Max_on_empty_sequence_throws(async));
}
[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Complex_nested_query_doesnt_try_binding_to_grandparent_when_parent_returns_complex_result(bool async)
{
return base.Complex_nested_query_doesnt_try_binding_to_grandparent_when_parent_returns_complex_result(async);
}
[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Correlated_collection_with_distinct_without_default_identifiers_projecting_columns(bool async)
{
return base.Correlated_collection_with_distinct_without_default_identifiers_projecting_columns(async);
}
[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Correlated_collection_with_distinct_without_default_identifiers_projecting_columns_with_navigation(bool async)
{
return base.Correlated_collection_with_distinct_without_default_identifiers_projecting_columns_with_navigation(async);
}
[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task DefaultIfEmpty_in_subquery_nested_filter_order_comparison(bool async)
{
return base.DefaultIfEmpty_in_subquery_nested_filter_order_comparison(async);
}
[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Select_correlated_subquery_ordered(bool async)
{
return base.Select_correlated_subquery_ordered(async);
}
[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Select_subquery_recursive_trivial(bool async)
{
return base.Select_subquery_recursive_trivial(async);
}
[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task SelectMany_correlated_subquery_hard(bool async)
{
return base.SelectMany_correlated_subquery_hard(async);
}
[Theory(Skip = "Different implicit ordering on Firebird.")]
[MemberData(nameof(IsAsyncData))]
public override Task Entity_equality_orderby_subquery(bool async)
{
return base.Entity_equality_orderby_subquery(async);
}
[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Subquery_with_navigation_inside_inline_collection(bool async)
{
return base.Subquery_with_navigation_inside_inline_collection(async);
}
[NotSupportedByProviderTheory]
[MemberData(nameof(IsAsyncData))]
public override Task SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector(bool async)
{
return base.SelectMany_correlated_with_Select_value_type_and_DefaultIfEmpty_in_selector(async);
}
[NotSupportedByProviderTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Where_nanosecond_and_microsecond_component(bool async)
{
return base.Where_nanosecond_and_microsecond_component(async);
}
[NotSupportedByProviderTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Contains_over_concatenated_columns_both_fixed_length(bool async)
{
return base.Contains_over_concatenated_columns_both_fixed_length(async);
}
}