2010-05-27 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Thu, 27 May 2010 13:01:16 +0000 (13:01 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Thu, 27 May 2010 13:01:16 +0000 (13:01 -0000)
* IsolatedStorageFileTest.cs: New test case for GetCreationTime.

svn path=/trunk/mcs/; revision=158031

mcs/class/corlib/Test/System.IO.IsolatedStorage/ChangeLog
mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs

index 58142b62f3bfd725bde7a1f6fffd2c4168fa42eb..1f4e44633a39c7cefc24e143361f958cfdd8e1db 100644 (file)
@@ -1,3 +1,7 @@
+2010-05-27  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * IsolatedStorageFileTest.cs: New test case for GetCreationTime.
+
 2010-05-26  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * IsolatedStorageFileStreamTest.cs: New test cases for constructor
index bd3b10545f2bf3384041dc5baaba37994c1a26a5..a81452b0a663a78a481db42f1ba40ed5e79dadd9 100644 (file)
@@ -642,6 +642,42 @@ namespace MonoTests.System.IO.IsolatedStorageTest {
                        }
                }
 
+               [Test]
+               public void GetCreationTime ()
+               {
+                       IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly ();
+
+                       // This is not causing an exception
+                       isf.GetCreationTime ("doesntexist");
+                       isf.GetCreationTime ("dir/doesntexist");
+
+                       try {
+                               isf.GetCreationTime (String.Empty);
+                               Assert.Fail ("#Exc1");
+                       } catch (ArgumentException) {
+                       }
+
+                       try {
+                               isf.GetCreationTime ("   ");
+                               Assert.Fail ("#Exc2");
+                       } catch (ArgumentException) {
+                       }
+
+                       isf.Close ();
+                       try {
+                               isf.GetCreationTime ("doesntexist");
+                               Assert.Fail ("#Exc3");
+                       } catch (InvalidOperationException) {
+                       }
+
+                       isf.Dispose ();
+                       try {
+                               isf.GetCreationTime ("doesntexist");
+                               Assert.Fail ("#Exc4");
+                       } catch (ObjectDisposedException) {
+                       }
+               }
+
                [Test]
                public void MoveDirectory ()
                {