public void Test_GetCoefficients() { double[] coefficients = new double[] { 1, 2, 3, 4, 5 }; Polynom polynom = new Polynom(coefficients); IStructuralEquatable coeff = coefficients; Assert.IsTrue(coeff.Equals(polynom.GetCoefficients(), StructuralComparisons.StructuralEqualityComparer)); }
public void Constructor_Coefficietn2Degree5_MonomialDgree5() { Polynom polynom = new Polynom(2, 5); double[] expected = new double[] { 0, 0, 0, 0, 0, 2 }; IStructuralEquatable actual = polynom.GetCoefficients(); Assert.IsTrue(actual.Equals(expected, StructuralComparisons.StructuralEqualityComparer)); }
public void Constructor_WithoutParameters_0() { Polynom polynom = new Polynom(); double[] expected = new double[] { 0 }; IStructuralEquatable actual = polynom.GetCoefficients(); Assert.IsTrue(actual.Equals(expected, StructuralComparisons.StructuralEqualityComparer)); }