File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 79
79
<Compile Include =" ..\GlobalAssemblyInfo.cs" >
80
80
<Link >Properties\GlobalAssemblyInfo.cs</Link >
81
81
</Compile >
82
+ <Compile Include =" ..\TestEnvironment.cs" >
83
+ <Link >TestEnvironment.cs</Link >
84
+ </Compile >
82
85
<Compile Include =" Core\CommandResults\CollectionStatsResultTests.cs" />
83
86
<Compile Include =" Core\CommandResults\CommandResultTests.cs" />
84
87
<Compile Include =" Core\CommandResults\DatabaseStatsResultTests.cs" />
Original file line number Diff line number Diff line change 28
28
using MongoDB . Bson . Serialization . Attributes ;
29
29
using MongoDB . Driver ;
30
30
using MongoDB . Driver . Builders ;
31
+ using MongoDB . UnitTests ;
31
32
32
33
namespace MongoDB . DriverOnlineTests . Jira . CSharp355
33
34
{
@@ -57,6 +58,12 @@ public void TestFixtureSetup()
57
58
[ Test ]
58
59
public void TestBitmap ( )
59
60
{
61
+ if ( TestEnvironment . MonoRuntime )
62
+ {
63
+ // this test does not work in Mono. Skipping for the time being
64
+ // CSHARP-389
65
+ return ;
66
+ }
60
67
var bitmap = new Bitmap ( 1 , 2 ) ;
61
68
var c = new C { I = bitmap , B = bitmap } ;
62
69
_collection . RemoveAll ( ) ;
Original file line number Diff line number Diff line change
1
+ /* Copyright 2010-2011 10gen 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 ;
17
+
18
+ namespace MongoDB . UnitTests
19
+ {
20
+ internal class TestEnvironment
21
+ {
22
+ private static bool _monoRuntime = false ;
23
+
24
+ static TestEnvironment ( )
25
+ {
26
+ var type = Type . GetType ( "Mono.Runtime" ) ;
27
+ if ( type != null )
28
+ {
29
+ _monoRuntime = true ;
30
+ }
31
+ }
32
+
33
+ /// <summary>
34
+ /// Check to see if the code is being executed on the Mono runtime as opposed to the normal
35
+ /// Microsoft .Net runtime
36
+ /// @returns true if running in Mono
37
+ /// </summary>
38
+ internal static bool MonoRuntime
39
+ {
40
+ get { return _monoRuntime ; }
41
+ }
42
+ }
43
+ }
You can’t perform that action at this time.
0 commit comments