1
1
// Copyright (c) .NET Foundation. All rights reserved.
2
2
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3
3
4
+ using System ;
4
5
using System . Threading . Tasks ;
6
+ using Microsoft . EntityFrameworkCore . Sqlite . Internal ;
5
7
using Xunit ;
6
8
7
9
namespace Microsoft . EntityFrameworkCore . Query
@@ -19,36 +21,72 @@ public override Task Include_inside_subquery(bool async)
19
21
return base . Include_inside_subquery ( async) ;
20
22
}
21
23
22
- // Sqlite does not support cross/outer apply
23
- public override Task Filtered_include_after_different_filtered_include_different_level ( bool async )
24
- => null ;
24
+ public override async Task Filtered_include_after_different_filtered_include_different_level ( bool async )
25
+ => Assert . Equal (
26
+ SqliteStrings . ApplyNotSupported ,
27
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
28
+ ( ) => base . Filtered_include_after_different_filtered_include_different_level ( async) ) ) . Message ) ;
25
29
26
- public override void Filtered_include_outer_parameter_used_inside_filter ( ) { }
30
+ public override void Filtered_include_outer_parameter_used_inside_filter ( )
31
+ => Assert . Equal (
32
+ SqliteStrings . ApplyNotSupported ,
33
+ Assert . Throws < InvalidOperationException > (
34
+ ( ) => base . Filtered_include_outer_parameter_used_inside_filter ( ) ) . Message ) ;
27
35
28
- public override Task Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation ( bool async )
29
- => null ;
36
+ public override async Task Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation ( bool async )
37
+ => Assert . Equal (
38
+ SqliteStrings . ApplyNotSupported ,
39
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
40
+ ( ) => base . Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation ( async) ) ) . Message ) ;
30
41
31
- public override Task Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only (
42
+ public override async Task Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only (
32
43
bool async )
33
- => null ;
44
+ => Assert . Equal (
45
+ SqliteStrings . ApplyNotSupported ,
46
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
47
+ ( ) => base . Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only ( async) ) ) . Message ) ;
34
48
35
- public override Task Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes ( bool async )
36
- => null ;
49
+ public override async Task Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes ( bool async )
50
+ => Assert . Equal (
51
+ SqliteStrings . ApplyNotSupported ,
52
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
53
+ ( ) => base . Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes ( async) ) ) . Message ) ;
37
54
38
- public override Task Filtered_include_complex_three_level_with_middle_having_filter1 ( bool async )
39
- => null ;
55
+ public override async Task Filtered_include_complex_three_level_with_middle_having_filter1 ( bool async )
56
+ => Assert . Equal (
57
+ SqliteStrings . ApplyNotSupported ,
58
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
59
+ ( ) => base . Filtered_include_complex_three_level_with_middle_having_filter1 ( async) ) ) . Message ) ;
40
60
41
- public override Task Filtered_include_complex_three_level_with_middle_having_filter2 ( bool async )
42
- => null ;
61
+ public override async Task Filtered_include_complex_three_level_with_middle_having_filter2 ( bool async )
62
+ => Assert . Equal (
63
+ SqliteStrings . ApplyNotSupported ,
64
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
65
+ ( ) => base . Filtered_include_complex_three_level_with_middle_having_filter2 ( async) ) ) . Message ) ;
43
66
44
- public override Task Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation_split ( bool async )
45
- => null ;
67
+ public override async Task Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation_split ( bool async )
68
+ => Assert . Equal (
69
+ SqliteStrings . ApplyNotSupported ,
70
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
71
+ ( ) => base . Filtered_include_and_non_filtered_include_followed_by_then_include_on_same_navigation_split ( async) ) ) . Message ) ;
46
72
47
- public override Task
73
+ public override async Task
48
74
Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only_split ( bool async )
49
- => null ;
75
+ => Assert . Equal (
76
+ SqliteStrings . ApplyNotSupported ,
77
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
78
+ ( ) => base . Filtered_include_multiple_multi_level_includes_with_first_level_using_filter_include_on_one_of_the_chains_only_split ( async) ) ) . Message ) ;
50
79
51
- public override Task Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes_split ( bool async )
52
- => null ;
80
+ public override async Task Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes_split ( bool async )
81
+ => Assert . Equal (
82
+ SqliteStrings . ApplyNotSupported ,
83
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
84
+ ( ) => base . Filtered_include_same_filter_set_on_same_navigation_twice_followed_by_ThenIncludes_split ( async) ) ) . Message ) ;
85
+
86
+ public override async Task Let_let_contains_from_outer_let ( bool async )
87
+ => Assert . Equal (
88
+ SqliteStrings . ApplyNotSupported ,
89
+ ( await Assert . ThrowsAsync < InvalidOperationException > (
90
+ ( ) => base . Let_let_contains_from_outer_let ( async) ) ) . Message ) ;
53
91
}
54
92
}
0 commit comments