{
final byte[] arr1 = new byte[] {0, 0};
final byte[] arr2 = new byte[] {0, 0};
final byte[] arr3 = new byte[] {0, 0};
final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
assertTrue(f1.equals(f2));
assertTrue(f1.matches(f2));
assertTrue(f2.equals(f1));
assertTrue(f2.matches(f1));
}
// dimension
{
final byte[] arr1 = new byte[] {0, 0};
final byte[] arr2 = new byte[] {0, 0};
final byte[] arr3 = new byte[] {0, 0};
final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(0, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
assertFalse(f1.equals(f2));
assertFalse(f1.matches(f2));
assertFalse(f2.equals(f1));
assertFalse(f2.matches(f1));
}
// dataType
{
final byte[] arr1 = new byte[] {0, 0};
final byte[] arr2 = new byte[] {0, 0};
final byte[] arr3 = new byte[] {0, 0};
final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.shortArray, 3.f, 1, 2, arr1, arr2, arr3);
assertFalse(f1.equals(f2));
assertFalse(f1.matches(f2));
assertFalse(f2.equals(f1));
assertFalse(f2.matches(f1));
}
// max
{
final byte[] arr1 = new byte[] {0, 0};
final byte[] arr2 = new byte[] {0, 0};
final byte[] arr3 = new byte[] {0, 0};
final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2001, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
assertFalse(f1.equals(f2));
assertTrue(f1.matches(f2));
assertFalse(f2.equals(f1));
assertTrue(f2.matches(f1));
}
{
final byte[] arr1 = new byte[] {0, 0};
final byte[] arr2 = new byte[] {0, 0};
final byte[] arr3 = new byte[] {0, 0};
final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 4.f, 1, 2, arr1, arr2, arr3);
assertFalse(f1.equals(f2));
assertFalse(f1.matches(f2));
assertFalse(f2.equals(f1));
assertFalse(f2.matches(f1));
}
{
final byte[] arr1 = new byte[] {0, 0};
final byte[] arr2 = new byte[] {0, 0};
final byte[] arr3 = new byte[] {0, 0};
final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 2, 2, arr1, arr2, arr3);
assertFalse(f1.equals(f2));
assertFalse(f1.matches(f2));
assertFalse(f2.equals(f1));
assertFalse(f2.matches(f1));
}
{
final byte[] arr1 = new byte[] {0, 0};
final byte[] arr2 = new byte[] {0, 0};
final byte[] arr3 = new byte[] {0, 0};
final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 3, arr1, arr2, arr3);
assertFalse(f1.equals(f2));
assertFalse(f1.matches(f2));
assertFalse(f2.equals(f1));
assertFalse(f2.matches(f1));
}
{
final byte[] arr1 = new byte[] {0, 0};
final byte[] arr2 = new byte[] {0, 0};
final byte[] arr3 = new byte[] {0, 0};
final IndexedColorFormat f1 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 2, arr1, arr2, arr3);
final IndexedColorFormat f2 = new IndexedColorFormat(new Dimension(1, 1), 2000, Format.byteArray, 3.f, 1, 3, new byte[] {0, 0}, arr2, arr3);
assertFalse(f1.equals(f2));
assertFalse(f1.matches(f2));
assertFalse(f2.equals(f1));
assertFalse(f2.matches(f1));
}
}