Link to home
Start Free TrialLog in
Avatar of CipherIS
CipherISFlag for United States of America

asked on

C# Assert.AreEqual

I am trying to test my code but I am getting an error and I shouldn't.  Code is below.

List<string> expected = new List<string>();
expected.Add("hello");

List<string> result = new List<string>();
result.Add("hello");

Assert.AreEqual(expected, result);

Open in new window


I'm receiving the following error:  

Assert.AreEqual failed.
Expected:<System.Collections.Generic.List`1[System.String]>.
Actual:<System.Collections.Generic.List`1[System.String]>.
ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CipherIS

ASKER

thank you