public void TestToStringMethod() { var a = new AClassWithToString(); string expected = @"new AClassWithToString() { B = ""hello"" C = new Int32[]() C[0] = 5 C[1] = 4 C[2] = 3 C[3] = 2 C[4] = 1 }"; Assert.AreEqual(expected, a.ToString()); }