public void SetCreateNewOnWriteableStream2() { stream = new FakeStream(true, true, true); stream.Write(new byte [1000], 0, 1000); package = Package.Open(stream, FileMode.CreateNew); Assert.AreEqual(0, stream.Length, "#1"); }
public void ReadOnlyAccess() { stream = new FakeStream(true, false, true); package = Package.Open(path, FileMode.CreateNew, FileAccess.Read); try { package.DeleteRelationship(contentType); Assert.Fail("Cannot modify a read-only package"); } catch (IOException) { } }
public void ReadableSeekableStream() { stream = new FakeStream(true, false, true); package = Package.Open(stream); try { package.DeleteRelationship(contentType); Assert.Fail("Cannot modify a read-only package"); } catch (IOException) { } }
public void ReadableSeekableFullStream () { stream = new FakeStream (true, false, true); stream.Write (new byte [10], 0, 10); package = Package.Open (stream); }
public void ReadableSeekableStream () { stream = new FakeStream (true, false, true); package = Package.Open (stream); try { package.DeleteRelationship (contentType); Assert.Fail ("Cannot modify a read-only package"); } catch (IOException) { } }
public void ReadableStream () { stream = new FakeStream (true, false, false); package = Package.Open (stream); }
public virtual void Setup() { stream = new FakeStream(); package = Package.Open(stream, FileMode.Create); }
public void UnusableStream () { stream = new FakeStream (false, false, false); package = Package.Open (stream); }
public void SetTruncateOnWriteablePath () { stream = new FakeStream (true, true, true); File.Create (path).Close (); package = Package.Open (path, FileMode.Truncate); }
public void SetCreateNewOnWriteableStream2 () { stream = new FakeStream (true, true, true); stream.Write (new byte [1000], 0, 1000); package = Package.Open (stream, FileMode.CreateNew); Assert.AreEqual (0, stream.Length, "#1"); }
public void SetTruncateOnWriteableStream() { stream = new FakeStream(true, true, true); package = Package.Open(stream, FileMode.Truncate); }
public void SetAppendOnWriteableStream() { stream = new FakeStream(true, true, true); package = Package.Open(stream, FileMode.Append); }
public void ReadableStream() { stream = new FakeStream(true, false, false); package = Package.Open(stream); }
public void ReadableSeekableFullStream() { stream = new FakeStream(true, false, true); stream.Write(new byte [10], 0, 10); package = Package.Open(stream); }
public void ReadOnlyAccess () { stream = new FakeStream (true, false, true); package = Package.Open (path, FileMode.CreateNew, FileAccess.Read); try { package.DeleteRelationship (contentType); Assert.Fail ("Cannot modify a read-only package"); } catch (IOException) { } }
public void SetTruncateOnWriteablePath() { stream = new FakeStream(true, true, true); File.Create(path).Close(); package = Package.Open(path, FileMode.Truncate); }
public void SetAppendOnWriteableStream () { stream = new FakeStream (true, true, true); package = Package.Open (stream, FileMode.Append); }
public void StreamCreate() { stream = new FakeStream(true, true, true); package = Package.Open(stream, FileMode.Create); }
public void SetTruncateOnWriteableStream () { stream = new FakeStream (true, true, true); package = Package.Open (stream, FileMode.Truncate); }
public void UnusableStream() { stream = new FakeStream(false, false, false); package = Package.Open(stream); }
public void StreamCreate () { stream = new FakeStream (true, true, true); package = Package.Open (stream, FileMode.Create); }
public void CorruptStream() { stream = new FakeStream(true, true, true); stream.Write(new byte [1024], 0, 1024); package = Package.Open(stream); }
public void CorruptStream () { stream = new FakeStream (true, true, true); stream.Write (new byte [1024], 0, 1024); package = Package.Open (stream); }
public virtual void Setup () { stream = new FakeStream (); package = Package.Open (stream, FileMode.Create); }