// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

package org.wpilib.math.spline.proto;

import static org.junit.jupiter.api.Assertions.assertArrayEquals;

import org.wpilib.ProtoTestBase;
import org.wpilib.math.proto.ProtobufQuinticHermiteSpline;
import org.wpilib.math.spline.QuinticHermiteSpline;

@SuppressWarnings("PMD.TestClassWithoutTestCases")
class QuinticHermiteSplineProtoTest
    extends ProtoTestBase<QuinticHermiteSpline, ProtobufQuinticHermiteSpline> {
  QuinticHermiteSplineProtoTest() {
    super(
        new QuinticHermiteSpline(
            new double[] {0.1, 0.3, 0.7},
            new double[] {0.4, -0.2, -0.6},
            new double[] {1.5, 1.3, 1.6},
            new double[] {-2.4, -1.1, -2.1}),
        QuinticHermiteSpline.proto);
  }

  @Override
  public void checkEquals(QuinticHermiteSpline testData, QuinticHermiteSpline data) {
    assertArrayEquals(testData.xInitialControlVector, data.xInitialControlVector);
    assertArrayEquals(testData.xFinalControlVector, data.xFinalControlVector);
    assertArrayEquals(testData.yInitialControlVector, data.yInitialControlVector);
    assertArrayEquals(testData.yFinalControlVector, data.yFinalControlVector);
  }
}
