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]
Assert.AreEqual (Color.Black.B, color.B);
}
- //[Test]
+ [Test]
public void Clone()
{
string sInFile = getInFile ("bitmaps/almogaver24bits.bmp");
Assert.AreEqual (colororg50, colornew50);
}
- //[Test]
+ [Test]
public void CloneImage()
{
string sInFile = getInFile ("bitmaps/almogaver24bits.bmp");
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);
}
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)
{