mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
841 B
33 lines
841 B
// <copyright file="PixelAccessorTests.cs" company="James Jackson-South">
|
|
// Copyright (c) James Jackson-South and contributors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
// </copyright>
|
|
|
|
namespace ImageSharp.Tests
|
|
{
|
|
using System;
|
|
|
|
using Xunit;
|
|
|
|
/// <summary>
|
|
/// Tests the <see cref="Image"/> class.
|
|
/// </summary>
|
|
public class ImageTests
|
|
{
|
|
[Fact]
|
|
public void ConstructorByteArray()
|
|
{
|
|
Assert.Throws<ArgumentNullException>(() =>
|
|
{
|
|
new Image((byte[])null);
|
|
});
|
|
|
|
TestFile file = TestFile.Create(TestImages.Bmp.Car);
|
|
using (Image image = new Image(file.Bytes))
|
|
{
|
|
Assert.Equal(600, image.Width);
|
|
Assert.Equal(450, image.Height);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|