public void ToStringTest() { //arrange CPolynomial poly = new CPolynomial(new Complex[] { 3, 1.1, 1, 0, 0, new Complex(-5, 12.3) }); string expected = "3 + 1.1*t + t^2 + (-5 + 12.3i)*t^5"; //action var actual = poly.ToString(null, CultureInfo.InvariantCulture, "t"); //assert actual.Should().Be(expected); }