* PEAPI.cs: Clean up indentation. Split into ...
[mono.git] / mcs / class / System.Drawing / Test / System.Drawing / TestBitmap.cs
index 0656307f870bf3e2fd334d088bc75baf74361885..16f0b4a0056a39f63f1242ea994530f6bb74ec33 100644 (file)
@@ -38,10 +38,12 @@ using System.IO;
 using System.Security.Cryptography;
 using System.Text;
 using System.Runtime.InteropServices;
+using System.Security.Permissions;
 
 namespace MonoTests.System.Drawing{
 
-       [TestFixture]   
+       [TestFixture]
+       [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
        public class TestBitmap {
                
                [TearDown]
@@ -120,7 +122,7 @@ namespace MonoTests.System.Drawing{
                        Assert.AreEqual (Color.Black.B, color.B);                                                                               
                }
                
-               //[Test]
+               [Test]
                public void Clone()
                {
                        string sInFile = getInFile ("bitmaps/almogaver24bits.bmp");
@@ -140,7 +142,7 @@ namespace MonoTests.System.Drawing{
                        Assert.AreEqual (colororg50, colornew50);                               
                }       
                
-               //[Test]
+               [Test]
                public void CloneImage()
                {
                        string sInFile = getInFile ("bitmaps/almogaver24bits.bmp");                     
@@ -148,9 +150,9 @@ namespace MonoTests.System.Drawing{
                        
                        Bitmap bmpNew = (Bitmap) bmp.Clone ();                  
                        
-                       /*Assert.AreEqual (bmp.Width, bmpNew.Width);
+                       Assert.AreEqual (bmp.Width, bmpNew.Width);
                        Assert.AreEqual (bmp.Height, bmpNew.Height);            
-                       Assert.AreEqual (bmp.PixelFormat, bmpNew.PixelFormat);                  */
+                       Assert.AreEqual (bmp.PixelFormat, bmpNew.PixelFormat);
                        
                }       
 
@@ -165,6 +167,13 @@ namespace MonoTests.System.Drawing{
                        Assert.AreEqual (1, cnt);                                                               
                        Assert.AreEqual (0, active);                                                                                    
                }
+               
+               [Test]
+               [ExpectedException (typeof (ArgumentException))]
+               public void FileDoesNotExists ()
+               {                       
+                       Bitmap  bmp = new Bitmap ("FileDoesNotExists.jpg");                     
+               }
 
                static string ByteArrayToString(byte[] arrInput)
                {