Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 15a54d6

Browse filesBrowse files
Samuel CorderSamuel Corder
Samuel Corder
authored and
Samuel Corder
committed
Debugging why nunit stopped working.
1 parent ac54d9b commit 15a54d6
Copy full SHA for 15a54d6

File tree

4 files changed

+11
-33
lines changed
Filter options

4 files changed

+11
-33
lines changed

‎MongoDB.Net-Tests/MongoTestBase.cs

Copy file name to clipboardExpand all lines: MongoDB.Net-Tests/MongoTestBase.cs
+4-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/*
21
using System;
32
using NUnit.Framework;
43

@@ -19,15 +18,16 @@ public Database DB{
1918
/// </summary>
2019
public abstract string TestCollections{get;}
2120

22-
23-
21+
22+
[TestFixtureSetUp]
2423
public virtual void Init(){
2524
this.Mongo = new Mongo();
2625
this.Mongo.Connect();
2726
cleanDB();
2827
}
2928

3029

30+
[TestFixtureTearDown]
3131
public virtual void Dispose(){
3232
this.Mongo.Disconnect();
3333
}
@@ -39,5 +39,4 @@ protected void cleanDB(){
3939
}
4040
}
4141
}
42-
}
43-
*/
42+
}
+3-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
1-
/*using System;
1+
using System;
22

33
using NUnit.Framework;
44

55

66
namespace MongoDB.Driver
77
{
88
[TestFixture]
9-
public class TestCollectionSafeMode
9+
public class TestCollectionSafeMode : MongoTestBase
1010
{
11-
public Mongo Mongo{get;set;}
12-
public Database DB{
13-
get{
14-
return this.Mongo["tests"];
15-
}
16-
}
17-
public string TestCollections {
18-
//public override string TestCollections {
11+
public override string TestCollections {
1912
get {
2013
return "safeinsert, safeupdate, safedelete";
2114
}
@@ -43,16 +36,5 @@ public void TestBadInsert(){
4336
}
4437
Assert.IsTrue(thrown);
4538
}
46-
47-
[TestFixtureSetUp]
48-
public void Init(){
49-
//base.Init();
50-
}
51-
52-
[TestFixtureTearDown]
53-
public void Dispose(){
54-
//base.Dispose();
55-
}
5639
}
5740
}
58-
*/

‎MongoDBDriver/Collection.cs

Copy file name to clipboardExpand all lines: MongoDBDriver/Collection.cs
+4-6
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ public void Update(Document doc, Document selector, int flags){
258258
this.Update(doc,selector,(UpdateFlags)flags);
259259
}
260260

261+
262+
public void UpdateAll (Document doc, Document selector, bool safemode){
263+
throw new System.NotImplementedException();
264+
}
261265
/// <summary>
262266
/// Runs a multiple update query against the database. It will wrap any
263267
/// doc with $set if the passed in doc doesn't contain any '$' ops.
@@ -280,12 +284,6 @@ public void UpdateAll(Document doc, Document selector){
280284
this.Update(doc, selector, UpdateFlags.MultiUpdate);
281285
}
282286

283-
284-
public void UpdateAll (Document doc, Document selector, bool safemode)
285-
{
286-
throw new System.NotImplementedException();
287-
}
288-
289287

290288
private void CheckError(bool safemode){
291289
if(safemode){

‎MongoDBDriver/Util/ErrorTranslator.cs

Copy file name to clipboardExpand all lines: MongoDBDriver/Util/ErrorTranslator.cs
-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ private static MongoException BuildException(string errnum, string msg, Document
4949
return new MongoOperationException(msg, error);
5050
}
5151
}
52-
return null;
5352
}
5453

5554
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.