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]
string sOutFile = getOutSubDir() + "transparent.bmp";
Bitmap bmp = new Bitmap(sInFile);
- Console.WriteLine("Bitmap loaded OK", bmp != null);
bmp.MakeTransparent();
bmp.Save(sOutFile);
Assert.AreEqual (bmp.Width, bmpNew.Width);
Assert.AreEqual (bmp.Height, bmpNew.Height);
- Assert.AreEqual (bmp.PixelFormat, bmpNew.PixelFormat);
+ Assert.AreEqual (bmp.PixelFormat, bmpNew.PixelFormat);
}
- //[Test]
+ [Test]
public void Frames()
{
string sInFile = getInFile ("bitmaps/almogaver24bits.bmp");
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)
{
firsts, changes them, and then using GetPixel does another check of the changes.
The results match the .Net framework
*/
- [Test]
+ //[Test]
public void LockBitmap ()
{
string hash = "";