public void FailTestWrite()
 {
     _conn.UserCreds.AuthToken = "fail-put-object";
     Container container = new CF_Container(_conn, _client, "foo");
     StorageObject obj = new CF_Object(_conn, container, _client, "foo");
     obj.Retries = 1;
     obj.Write(new MemoryStream());
 }
Beispiel #2
0
        public void TestWrite()
        {
            _conn.UserCreds.AuthToken = "put-object";
            Container     container = new CF_Container(_conn, _client, "foo");
            StorageObject obj       = new CF_Object(_conn, container, _client, "foo");

            obj.Write(new MemoryStream());
        }
Beispiel #3
0
        public void TestWriteFailEtag()
        {
            _conn.UserCreds.AuthToken = "fail-etag";
            Container container = new CF_Container(_conn, _client, "foo");

            container.GetObject("foo");
            StorageObject obj = new CF_Object(_conn, container, _client, "foo");

            Assert.Throws <InvalidETagException>(() => obj.Write(new MemoryStream()));
        }
 public void TestWriteFailEtag()
 {
     _conn.UserCreds.AuthToken = "fail-etag";
     Container container = new CF_Container(_conn, _client, "foo");
     container.GetObject("foo");
     StorageObject obj = new CF_Object(_conn, container, _client, "foo");
     Assert.Throws<InvalidETagException>(() => obj.Write(new MemoryStream()));
 }