A cross-platform UI framework for .NET
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.
 
 
 

23 lines
490 B

using Xunit;
namespace Avalonia.Visuals.UnitTests
{
public class SizeTests
{
[Fact]
public void Should_Produce_Correct_Aspect_Ratio()
{
var result = new Size(3, 2).AspectRatio;
Assert.Equal(1.5, result);
}
[Fact]
public void Dividing_Should_Produce_Scaling_Factor()
{
var result = new Size(15, 10) / new Size(5, 5);
Assert.Equal(new Vector(3, 2), result);
}
}
}