[banshee] tests: Fix SourceManager tests for new GroupSource handling



commit a35cb93c0c890475e2ab12e9fecaf20cc6d7fe1d
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Tue Aug 23 21:48:45 2011 +0200

    tests: Fix SourceManager tests for new GroupSource handling
    
    GroupSources are not counted as real sources anymore, so we use
    ErrorSources for the SourceManager unit tests.

 src/Core/Banshee.Services/Banshee.Sources/Tests.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Sources/Tests.cs b/src/Core/Banshee.Services/Banshee.Sources/Tests.cs
index 9067f41..97ff9b1 100644
--- a/src/Core/Banshee.Services/Banshee.Sources/Tests.cs
+++ b/src/Core/Banshee.Services/Banshee.Sources/Tests.cs
@@ -51,6 +51,7 @@ namespace Banshee.Sources
         {
             var sm = new SourceManager ();
             sm.Initialize ();
+            sm.AddSource (new ErrorSource ("Baz"));
             Assert.IsFalse (sm.Sources.Count == 0);
             sm.Dispose ();
             Assert.IsTrue (sm.Sources.Count == 0);
@@ -60,11 +61,11 @@ namespace Banshee.Sources
         public void AddRemove ()
         {
             var sm = new SourceManager ();
-            var src = new SourceManager.GroupSource ("Foo", 1);
+            var src = new ErrorSource ("Foo");
             sm.AddSource (src, false);
-            Assert.IsTrue (sm.Sources.Count == 1);
+            Assert.AreEqual (sm.Sources.Count, 1);
 
-            var src2 = new SourceManager.GroupSource ("Bar", 2);
+            var src2 = new ErrorSource ("Bar");
             sm.AddSource (src2, true);
             Assert.IsTrue (sm.Sources.Count == 2);
             Assert.AreEqual (src2, sm.DefaultSource);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]