[banshee] Fix Mono.Media unit tests
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] Fix Mono.Media unit tests
- Date: Fri, 15 Jan 2010 21:56:21 +0000 (UTC)
commit ef9d20095e98cba3af7442ed2ddd427bea564c73
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri Jan 15 13:54:25 2010 -0800
Fix Mono.Media unit tests
.../Media.Playlists.Xspf/Tests/XspfTests.cs | 31 +++++++++++--------
1 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/src/Libraries/Mono.Media/Media.Playlists.Xspf/Tests/XspfTests.cs b/src/Libraries/Mono.Media/Media.Playlists.Xspf/Tests/XspfTests.cs
index 2249a0f..1e07c07 100644
--- a/src/Libraries/Mono.Media/Media.Playlists.Xspf/Tests/XspfTests.cs
+++ b/src/Libraries/Mono.Media/Media.Playlists.Xspf/Tests/XspfTests.cs
@@ -42,27 +42,32 @@ namespace Media.Playlists.Xspf.Tests
public class XspfTest
{
private const string complete_path = "../tests/Mono.Media/xspf/complete.xml";
- private const string xsd_path = "../tests/Mono.Media/xspf/xspf-1.xsd";
+ private const string xsd_path = "../tests/Mono.Media/xspf/xspf-1_0.2.xsd";
[Test]
- public void Load()
+ public void Load ()
{
- Playlist playlist = new Playlist();
- playlist.Load(complete_path);
- Helper.TestPlaylist(playlist);
+ Playlist playlist = new Playlist ();
+ playlist.Load (complete_path);
+ Helper.TestPlaylist (playlist);
}
[Test]
- public void Validate()
+ public void Validate ()
{
- XmlReaderSettings settings = new XmlReaderSettings();
- settings.ValidationType = ValidationType.Schema;
- XmlSchemaSet schema_set = new XmlSchemaSet();
- schema_set.Add("http://xspf.org/ns/0/", xsd_path);
- settings.Schemas.Add(schema_set);
+ var schema_set = new XmlSchemaSet ();
+ schema_set.Add ("http://xspf.org/ns/0/", xsd_path);
+
+ var settings = new XmlReaderSettings () {
+ ValidationType = ValidationType.DTD
+ };
settings.ValidationFlags |= XmlSchemaValidationFlags.ReportValidationWarnings;
- XmlReader reader = XmlReader.Create(complete_path, settings);
- while(reader.Read());
+ settings.Schemas.Add (schema_set);
+
+ // Attribute declaration was not found for http://www.w3.org/XML/1998/namespace:base XML URI: file:///home/gabe/Projects/banshee/tests/Mono.Media/xspf/complete.xml
+
+ var reader = XmlReader.Create (complete_path, settings);
+ while (reader.Read ());
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]