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.
22 lines
587 B
22 lines
587 B
1 year ago
|
using StabilityMatrix.Avalonia.Helpers;
|
||
1 year ago
|
|
||
1 year ago
|
namespace StabilityMatrix.Tests.Helper;
|
||
1 year ago
|
|
||
|
[TestClass]
|
||
|
public class ImageProcessorTests
|
||
|
{
|
||
|
[DataTestMethod]
|
||
|
[DataRow(0, 1, 1)]
|
||
|
[DataRow(1, 1, 1)]
|
||
|
[DataRow(4, 2, 2)]
|
||
|
[DataRow(8, 2, 4)]
|
||
|
[DataRow(12, 3, 4)]
|
||
|
[DataRow(20, 4, 5)]
|
||
|
public void TestGetGridDimensionsFromImageCount(int count, int expectedRow, int expectedCols)
|
||
|
{
|
||
|
var result = ImageProcessor.GetGridDimensionsFromImageCount(count);
|
||
|
Assert.AreEqual(expectedRow, result.rows);
|
||
|
Assert.AreEqual(expectedCols, result.columns);
|
||
|
}
|
||
|
}
|