Imported Upstream version 3.12.0

Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
Jo Shields
2015-01-13 10:44:36 +00:00
parent 8b9b85e7f5
commit 181b81b4a4
659 changed files with 12743 additions and 16300 deletions

View File

@ -25,9 +25,11 @@
using System;
using System.IO;
using System.IO.Packaging;
using System.Collections.Generic;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
public class FakePackage : Package {
Dictionary<Uri, PackagePart> Parts { get; set; }
@ -77,4 +79,4 @@ namespace System.IO.Packaging.Tests {
return p;
}
}
}
}

View File

@ -24,9 +24,11 @@
//
using System;
using System.IO;
using System.IO.Packaging;
using System.Collections.Generic;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
class FakePackagePart : PackagePart {

View File

@ -26,9 +26,12 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Xml;
using NUnit.Framework;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class FakePackagePartTests : TestBase {
@ -146,7 +149,7 @@ namespace System.IO.Packaging.Tests {
}
[Test]
[ExpectedException (typeof (Xml.XmlException))]
[ExpectedException (typeof (XmlException))]
public void CreateDupeRelationship ()
{
part.CreateRelationship (uris [1], TargetMode.External, "blah", "asda");
@ -154,7 +157,7 @@ namespace System.IO.Packaging.Tests {
}
[Test]
[ExpectedException (typeof (Xml.XmlException))]
[ExpectedException (typeof (XmlException))]
public void CreateDupeRelationshipId ()
{
part.CreateRelationship (uris [1], TargetMode.External, "blah", "asda");

View File

@ -26,11 +26,13 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
namespace System.IO.Packaging.Tests
namespace MonoTests.System.IO.Packaging
{
[TestFixture]

View File

@ -25,9 +25,10 @@
using System;
using System.IO;
using System.Collections.Generic;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
public class FakeStream : MemoryStream {
public bool canRead;

View File

@ -8,7 +8,7 @@ using System;
using System.IO.Packaging;
using NUnit.Framework;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackUriHelperTests {

View File

@ -3,7 +3,7 @@ using System.IO;
using System.IO.Packaging;
using NUnit.Framework;
namespace System.IO.Packaging.Tests
namespace MonoTests.System.IO.Packaging
{
[TestFixture]
public class PackagePartFileTests
@ -135,4 +135,4 @@ namespace System.IO.Packaging.Tests
}
}
}
}
}

View File

@ -26,11 +26,13 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackagePartStreamTests : TestBase {
@ -190,4 +192,4 @@ namespace System.IO.Packaging.Tests {
Assert.IsTrue (stream.Length > buffer.Length * 2, "#4");
}
}
}
}

View File

@ -26,12 +26,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
using System.Xml;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackagePartTest : TestBase {

View File

@ -28,12 +28,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Linq;
using System.Text;
using System.Xml;
using NUnit.Framework;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackageRelationshipTests : TestBase {

View File

@ -26,11 +26,13 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackageTest : TestBase {
@ -411,8 +413,8 @@ namespace System.IO.Packaging.Tests {
[ExpectedException (typeof (FileFormatException))]
public void WriteOnlyAccessExists ()
{
System.IO.File.Create (path).Close ();
File.Create (path).Close ();
package = Package.Open (path, FileMode.OpenOrCreate, FileAccess.Write);
}
}
}
}

View File

@ -26,11 +26,13 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
namespace System.IO.Packaging.Tests {
namespace MonoTests.System.IO.Packaging {
public abstract class TestBase {
protected string contentType = "mime/type";