File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* Copyright 2010-2014 MongoDB Inc.
2
+ *
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ */
15
+
16
+ using System . Linq ;
17
+ using MongoDB . Driver . Linq ;
18
+ using NUnit . Framework ;
19
+
20
+ namespace MongoDB . DriverUnitTests . Jira . CSharp613
21
+ {
22
+ [ TestFixture ]
23
+ public class CSharp613Tests
24
+ {
25
+ private class C
26
+ {
27
+ public int Id ;
28
+ public short S ;
29
+ }
30
+
31
+ [ Test ]
32
+ public void TestShortToIntImplicitConversion ( )
33
+ {
34
+ var collection = Configuration . TestCollection ;
35
+
36
+ collection . Drop ( ) ;
37
+ collection . Save ( new C { Id = 0 , S = 2 } ) ;
38
+
39
+ var query = from c in collection . AsQueryable < C > ( )
40
+ where c . S == 2
41
+ select c ;
42
+
43
+ var result = query . FirstOrDefault ( ) ;
44
+ Assert . IsNotNull ( result ) ;
45
+ Assert . AreEqual ( 2 , result . S ) ;
46
+ }
47
+ }
48
+ }
Original file line number Diff line number Diff line change 129
129
<Compile Include =" GeoJsonObjectModel\GeoJsonMultiPolygonTests.cs" />
130
130
<Compile Include =" GeoJsonObjectModel\GeoJsonPointTests.cs" />
131
131
<Compile Include =" GeoJsonObjectModel\GeoJsonPolygonTests.cs" />
132
+ <Compile Include =" Jira\CSharp613Tests.cs" />
132
133
<Compile Include =" Jira\CSharp542Tests.cs" />
133
134
<Compile Include =" Jira\CSharp653Tests.cs" />
134
135
<Compile Include =" Jira\CSharp714Tests.cs" />
You can’t perform that action at this time.
0 commit comments