yield return new object[] { EmfType.EmfPlusOnly };
}
- [ActiveIssue(20884, TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.GdiplusIsAvailable)]
[MemberData(nameof(EmfType_TestData))]
public void Ctor_IntPtrEmfType_Success(EmfType emfType)
yield return new object[] { (EmfType)int.MinValue };
}
- [ActiveIssue(20884, TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.GdiplusIsAvailable)]
[MemberData(nameof(EmfType_Invalid_TestData))]
public void Ctor_IntPtrInvalidEmfType_ThrowsArgumentException(EmfType emfType)
File.Delete(fileName);
}
- [ActiveIssue(20884, TestPlatforms.AnyUnix)]
[ConditionalTheory(Helpers.GdiplusIsAvailable)]
[MemberData(nameof(EmfType_TestData))]
public void Ctor_StringIntPtrEmfType_Success(EmfType emfType)
}
}
- [ActiveIssue(20884, TestPlatforms.AnyUnix)]
[ConditionalFact(Helpers.GdiplusIsAvailable)]
public void Static_GetMetafileHeader_String_ReturnsExpected()
{
}
}
- [ActiveIssue(20884, TestPlatforms.AnyUnix)]
[ConditionalFact(Helpers.GdiplusIsAvailable)]
public void GetMetafileHeader_ReturnsExpected()
{
MetafileHeader headerA = metafile.GetMetafileHeader();
MetafileHeader headerB = metafile.GetMetafileHeader();
AssertMetafileHeader(headerA);
- Assert.False(ReferenceEquals(headerA, headerB));
+ Assert.NotSame(headerA, headerB);
}
}
}
[ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void GetMetafileHeader_WmfPlaceable()
- {
- using (Metafile mf = new Metafile(Helpers.GetTestBitmapPath(WmfPlaceable)))
- {
- MetafileHeader header1 = mf.GetMetafileHeader();
- Check_MetafileHeader_WmfPlaceable(header1);
-
- MetafileHeader header2 = mf.GetMetafileHeader();
- Assert.NotSame(header1, header2));
- }
- }
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
public void GetMetafileHeader_FromFile_WmfPlaceable()
{
using (Metafile mf = new Metafile(Helpers.GetTestBitmapPath(WmfPlaceable)))
Check_MetaHeader_WmfPlaceable(mh1);
MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader;
- Assert.NotSame(mh1, mh2));
+ Assert.NotSame(mh1, mh2);
}
}
Check_MetaHeader_WmfPlaceable(mh1);
MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader;
- Assert.NotSame(mh1, mh2));
+ Assert.NotSame(mh1, mh2);
}
}
Check_MetaHeader_WmfPlaceable(mh1);
MetaHeader mh2 = mf.GetMetafileHeader().WmfHeader;
- Assert.NotSame(mh1, mh2));
+ Assert.NotSame(mh1, mh2);
}
}
Check_MetafileHeader_Emf(header1);
}
}
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void Static_GetMetafileHeader_Filename()
- {
- string filename = Helpers.GetTestBitmapPath(WmfPlaceable);
- MetafileHeader header = Metafile.GetMetafileHeader(filename);
- Check_MetafileHeader_WmfPlaceable(header);
- }
}
public class MetafileFulltrustTest
}
[ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void Metafile_IntPtrEmfType_Invalid()
- {
- Assert.Throws<ArgumentException>(() => Metafile_IntPtrEmfType((EmfType)Int32.MinValue));
- }
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void Metafile_IntPtrEmfType_EmfOnly()
- {
- Metafile_IntPtrEmfType(EmfType.EmfOnly);
- }
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void Metafile_IntPtrEmfType_EmfPlusDual()
- {
- Metafile_IntPtrEmfType(EmfType.EmfPlusDual);
- }
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void Metafile_IntPtrEmfType_EmfPlusOnly()
- {
- Metafile_IntPtrEmfType(EmfType.EmfPlusOnly);
- }
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
public void Metafile_IntPtrRectangle_Empty()
{
using (Bitmap bmp = new Bitmap(10, 10, PixelFormat.Format32bppArgb))
}
[ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void CreateFilename_MultipleGraphics_EmfOnly()
- {
- Assert.Throws<OutOfMemoryException>(() => CreateFilename(EmfType.EmfOnly, false));
- }
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void CreateFilename_MultipleGraphics_EmfPlusDual()
- {
- Assert.Throws<OutOfMemoryException>(() => CreateFilename(EmfType.EmfPlusDual, false));
- }
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
- public void CreateFilename_MultipleGraphics_EmfPlusOnly()
- {
- Assert.Throws<OutOfMemoryException>(() => CreateFilename(EmfType.EmfPlusOnly, false));
- }
-
- [ConditionalFact(Helpers.GdiplusIsAvailable)]
public void Measure()
{
Font test_font = new Font(FontFamily.GenericMonospace, 12);